mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-12 11:44:08 +02:00
Merge pull request #6128 from 3D-I/ticket/16689
[ticket/16689] Fix SQL errors for Bitly OAuth
This commit is contained in:
@@ -77,6 +77,12 @@ class bitly extends base
|
||||
throw new exception('AUTH_PROVIDER_OAUTH_ERROR_REQUEST');
|
||||
}
|
||||
|
||||
// Prevent SQL error
|
||||
if (!isset($result['data']['login']))
|
||||
{
|
||||
throw new exception('AUTH_PROVIDER_OAUTH_RETURN_ERROR');
|
||||
}
|
||||
|
||||
// Return the unique identifier returned from bitly
|
||||
return $result['data']['login'];
|
||||
}
|
||||
@@ -101,6 +107,12 @@ class bitly extends base
|
||||
throw new exception('AUTH_PROVIDER_OAUTH_ERROR_REQUEST');
|
||||
}
|
||||
|
||||
// Prevent SQL error
|
||||
if (!isset($result['data']['login']))
|
||||
{
|
||||
throw new exception('AUTH_PROVIDER_OAUTH_RETURN_ERROR');
|
||||
}
|
||||
|
||||
// Return the unique identifier
|
||||
return $result['data']['login'];
|
||||
}
|
||||
|
Reference in New Issue
Block a user