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
|
@ -171,7 +171,7 @@ class DefaultTokenProvider implements IProvider {
|
||||||
throw new InvalidTokenException();
|
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);
|
throw new ExpiredTokenException($token);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue