Skip to content

Commit a56f7dd

Browse files
authored
Check that properties grant_types and scopes exist (#1722)
* Check that the attributes `grant_types` isset rather than property * Cover `scopes` as well
1 parent 72e805a commit a56f7dd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Client.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ public function skipsAuthorization()
164164
*/
165165
public function hasGrantType($grantType)
166166
{
167-
if (! isset($this->grant_types) || ! is_array($this->grant_types)) {
167+
if (! isset($this->attributes['grant_types']) || ! is_array($this->grant_types)) {
168168
return true;
169169
}
170170

@@ -179,7 +179,7 @@ public function hasGrantType($grantType)
179179
*/
180180
public function hasScope($scope)
181181
{
182-
if (! isset($this->scopes) || ! is_array($this->scopes)) {
182+
if (! isset($this->attributes['scopes']) || ! is_array($this->scopes)) {
183183
return true;
184184
}
185185

0 commit comments

Comments
 (0)