mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
[ticket/16689] Fix SQL errors for Bitly OAuth
PHPBB3-16689
This commit is contained in:
parent
2c4b862648
commit
c543400955
1 changed files with 12 additions and 2 deletions
|
@ -77,8 +77,13 @@ class bitly extends base
|
||||||
throw new exception('AUTH_PROVIDER_OAUTH_ERROR_REQUEST');
|
throw new exception('AUTH_PROVIDER_OAUTH_ERROR_REQUEST');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!isset($result['data']['login']))
|
||||||
|
{
|
||||||
|
throw new exception('AUTH_PROVIDER_OAUTH_RETURN_ERROR');
|
||||||
|
}
|
||||||
|
|
||||||
// Return the unique identifier returned from bitly
|
// Return the unique identifier returned from bitly
|
||||||
return $result['data']['login'] ?? throw new exception('AUTH_PROVIDER_OAUTH_RETURN_ERROR');
|
return $result['data']['login'];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -101,7 +106,12 @@ class bitly extends base
|
||||||
throw new exception('AUTH_PROVIDER_OAUTH_ERROR_REQUEST');
|
throw new exception('AUTH_PROVIDER_OAUTH_ERROR_REQUEST');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!isset($result['data']['login']))
|
||||||
|
{
|
||||||
|
throw new exception('AUTH_PROVIDER_OAUTH_RETURN_ERROR');
|
||||||
|
}
|
||||||
|
|
||||||
// Return the unique identifier
|
// Return the unique identifier
|
||||||
return $result['data']['login'] ?? throw new exception('AUTH_PROVIDER_OAUTH_RETURN_ERROR');
|
return $result['data']['login'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue