diff --git a/.gitignore b/.gitignore index 21299f3..11a3477 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ .idea .php_cs .php_cs.cache +.phpunit.cache .phpunit.result.cache build composer.lock diff --git a/src/Http/Requests/LoginLinkRequest.php b/src/Http/Requests/LoginLinkRequest.php index 29cd9f2..309152e 100644 --- a/src/Http/Requests/LoginLinkRequest.php +++ b/src/Http/Requests/LoginLinkRequest.php @@ -19,6 +19,10 @@ public function rules(): array public function userAttributes(): array { - return json_decode($this->user_attributes, true) ?? []; + if ($this->user_attributes !== null) { + return json_decode($this->user_attributes, true); + } + + return []; } }