Make the token expiration also work for autocasting 0

Some bad databases don't respect the default null apprently.
Now even if they cast it to 0 it should work just fine.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
pull/9804/head
Roeland Jago Douma 2018-06-08 16:20:43 +07:00
parent 877bae5fdb
commit a5a272e5d4
No known key found for this signature in database
GPG Key ID: F941078878347C0C
1 changed files with 1 additions and 1 deletions

@ -159,7 +159,7 @@ class DefaultTokenProvider implements IProvider {
throw new InvalidTokenException();
}
if ($token->getExpires() !== null && $token->getExpires() < $this->time->getTime()) {
if ((int)$token->getExpires() !== 0 && $token->getExpires() < $this->time->getTime()) {
throw new ExpiredTokenException($token);
}