$sameSite = strtolower($sameSite);
}
- if (!in_array($sameSite, array(self::SAMESITE_LAX, self::SAMESITE_STRICT, null), true)) {
+ if (!\in_array($sameSite, array(self::SAMESITE_LAX, self::SAMESITE_STRICT, null), true)) {
throw new \InvalidArgumentException('The "sameSite" parameter value is not valid.');
}
*/
public function isCleared()
{
- return $this->expire < time();
+ return 0 !== $this->expire && $this->expire < time();
}
/**