mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-02 04:24:56 +02:00
[ticket/16689] Fix SQL errors for Bitly OAuth
PHPBB3-16689
This commit is contained in:
parent
ddf5de8349
commit
2c4b862648
@ -95,6 +95,7 @@ $lang = array_merge($lang, array(
|
||||
'AUTH_PROVIDER_OAUTH_ERROR_INVALID_ENTRY' => 'Invalid database entry.',
|
||||
'AUTH_PROVIDER_OAUTH_ERROR_INVALID_SERVICE_TYPE' => 'Invalid service type provided to OAuth service handler.',
|
||||
'AUTH_PROVIDER_OAUTH_ERROR_REQUEST' => 'Something went wrong when processing your OAuth request.',
|
||||
'AUTH_PROVIDER_OAUTH_RETURN_ERROR' => 'The external service returned a wrong value therefore your request can not be processed.',
|
||||
'AUTH_PROVIDER_OAUTH_ERROR_SERVICE_NOT_CREATED' => 'OAuth service not created',
|
||||
'AUTH_PROVIDER_OAUTH_SERVICE_BITLY' => 'Bitly',
|
||||
'AUTH_PROVIDER_OAUTH_SERVICE_FACEBOOK' => 'Facebook',
|
||||
|
@ -78,7 +78,7 @@ class bitly extends base
|
||||
}
|
||||
|
||||
// Return the unique identifier returned from bitly
|
||||
return $result['data']['login'];
|
||||
return $result['data']['login'] ?? throw new exception('AUTH_PROVIDER_OAUTH_RETURN_ERROR');
|
||||
}
|
||||
|
||||
/**
|
||||
@ -102,6 +102,6 @@ class bitly extends base
|
||||
}
|
||||
|
||||
// Return the unique identifier
|
||||
return $result['data']['login'];
|
||||
return $result['data']['login'] ?? throw new exception('AUTH_PROVIDER_OAUTH_RETURN_ERROR');
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user