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>
This commit is contained in:
parent
8d26f9cd6d
commit
480864b3e3
1 changed files with 1 additions and 1 deletions
|
@ -171,7 +171,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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue