Skip to content

Commit

Permalink
Check that the properties grant_types and scopes exist
Browse files Browse the repository at this point in the history
  • Loading branch information
uintaam committed Feb 29, 2024
1 parent 72e805a commit d457a0b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ public function skipsAuthorization()
*/
public function hasGrantType($grantType)
{
if (! isset($this->grant_types) || ! is_array($this->grant_types)) {
if (! property_exists($this, 'grant_types') || ! isset($this->grant_types) || ! is_array($this->grant_types)) {
return true;
}

Expand All @@ -179,7 +179,7 @@ public function hasGrantType($grantType)
*/
public function hasScope($scope)
{
if (! isset($this->scopes) || ! is_array($this->scopes)) {
if (! property_exists($this, 'scopes') || ! isset($this->scopes) || ! is_array($this->scopes)) {
return true;
}

Expand Down

0 comments on commit d457a0b

Please sign in to comment.