From a56f7dd1f8718a69e309eb9e12c5d48d67d376eb Mon Sep 17 00:00:00 2001 From: Andrew Winter <295346+uintaam@users.noreply.github.com> Date: Fri, 1 Mar 2024 02:35:29 +0900 Subject: [PATCH] Check that properties `grant_types` and `scopes` exist (#1722) * Check that the attributes `grant_types` isset rather than property * Cover `scopes` as well --- src/Client.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Client.php b/src/Client.php index 78f9009e..727a6e28 100644 --- a/src/Client.php +++ b/src/Client.php @@ -164,7 +164,7 @@ public function skipsAuthorization() */ public function hasGrantType($grantType) { - if (! isset($this->grant_types) || ! is_array($this->grant_types)) { + if (! isset($this->attributes['grant_types']) || ! is_array($this->grant_types)) { return true; } @@ -179,7 +179,7 @@ public function hasGrantType($grantType) */ public function hasScope($scope) { - if (! isset($this->scopes) || ! is_array($this->scopes)) { + if (! isset($this->attributes['scopes']) || ! is_array($this->scopes)) { return true; }