Skip to content

Commit

Permalink
Use strict equality
Browse files Browse the repository at this point in the history
  • Loading branch information
chalasr committed Dec 8, 2021
1 parent f63a68e commit 2689aa7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Security/Http/Cookie/JWTCookieProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function createCookie(string $jwt, ?string $name = null, $expiresAt = nul
$jwt = $jwtParts->getParts($split ?: $this->defaultSplit);

if (null === $expiresAt) {
$expiresAt = $this->defaultLifetime == 0 ? 0 : (time() + $this->defaultLifetime);
$expiresAt = 0 === $this->defaultLifetime ? 0 : (time() + $this->defaultLifetime);
}

return new Cookie(
Expand Down
2 changes: 1 addition & 1 deletion Tests/Security/Http/Cookie/JWTCookieProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ public function testCreateSessionCookie()

$this->assertEquals(0, $cookie->getExpiresTime());
}
}
}

0 comments on commit 2689aa7

Please sign in to comment.