Skip to content
Snippets Groups Projects
Unverified Commit fae14beb authored by Joël Sunier's avatar Joël Sunier :beer: Committed by GitHub
Browse files

Merge pull request #15 from mvriel/token-could-be-null

Add explicit token whether $token equals null
parents 1a69b58b 04480be0
Branches
No related tags found
No related merge requests found
......@@ -70,7 +70,7 @@ class Unleash implements UnleashInterface
$token = $this->tokenStorage->getToken();
$user = null;
if (!method_exists($token, 'isAuthenticated')) {
if ($token === null || !method_exists($token, 'isAuthenticated')) {
$authenticated = $token !== null;
} else {
$authenticated = $token !== null && $token->isAuthenticated();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment