Skip to content

Commit 8a59875

Browse files
author
Will Taylor-Jackson
committed
fix: don't cast scopes as an array
Because it's already an array when it comes back from MongoDB - accessing `$token->scopes` without this change throws an error because it's trying to cast from a MySQL json-encoded array ``` json_decode() expects parameter 1 to be string, array given ```
1 parent 223df33 commit 8a59875

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

src/Passport/Token.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ class Token extends Model
4040
* @var array
4141
*/
4242
protected $casts = [
43-
'scopes' => 'array',
4443
'revoked' => 'bool',
4544
];
4645

0 commit comments

Comments
 (0)