mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-09 11:24:35 +02:00
[ticket/16799] Use offsetExists() method instead of array_key_exists()
PHPBB3-16799
This commit is contained in:
@ -163,7 +163,7 @@ class oauth extends base
|
||||
$provider = $this->request->variable('oauth_service', '', false);
|
||||
$service_name = $this->get_service_name($provider);
|
||||
|
||||
if ($provider === '' || !array_key_exists($service_name, (array) $this->service_providers))
|
||||
if ($provider === '' || !$this->service_providers->offsetExists($service_name))
|
||||
{
|
||||
return [
|
||||
'status' => LOGIN_ERROR_EXTERNAL_AUTH,
|
||||
@ -452,7 +452,7 @@ class oauth extends base
|
||||
|
||||
$service_name = $this->get_service_name($link_data['oauth_service']);
|
||||
|
||||
if (!array_key_exists($service_name, (array) $this->service_providers))
|
||||
if (!$this->service_providers->offsetExists($service_name))
|
||||
{
|
||||
return 'LOGIN_ERROR_OAUTH_SERVICE_DOES_NOT_EXIST';
|
||||
}
|
||||
|
Reference in New Issue
Block a user