diff --git a/src/Illuminate/Session/Store.php b/src/Illuminate/Session/Store.php index bf77ee3568ff..9da31a334fe9 100644 --- a/src/Illuminate/Session/Store.php +++ b/src/Illuminate/Session/Store.php @@ -159,7 +159,10 @@ protected function isInvalid($session) { if ( ! is_array($session)) return true; - return (time() - $session['last_activity']) > ($this->lifetime * 60); + return ( $this->lifetime === 0 + ? false + : (time() - $session['last_activity']) > ($this->lifetime * 60) + ); } /** @@ -623,4 +626,4 @@ public function offsetUnset($key) $this->forget($key); } -} \ No newline at end of file +}