From dd62829f96fdc12d19dd31777ca012a3faedeb41 Mon Sep 17 00:00:00 2001 From: rxu Date: Thu, 1 Jul 2021 03:04:38 +0700 Subject: [PATCH] [ticket/16799] Use offsetExists() method instead of array_key_exists() PHPBB3-16799 --- phpBB/phpbb/auth/provider/oauth/oauth.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/phpbb/auth/provider/oauth/oauth.php b/phpBB/phpbb/auth/provider/oauth/oauth.php index 6f28d0f04f..cc84bf5dd7 100644 --- a/phpBB/phpbb/auth/provider/oauth/oauth.php +++ b/phpBB/phpbb/auth/provider/oauth/oauth.php @@ -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'; }