From 2ada765f800a49bb3b774868deb3a9d8e1e28f9f Mon Sep 17 00:00:00 2001 From: Massamba Date: Wed, 19 Mar 2014 22:58:59 +0100 Subject: [PATCH] FIx bug (new Foo)->bar syntax not supported (new Foo)->bar is only supported in PHP 5.4 or more --- lib/Pike/Session/SaveHandler/Doctrine.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Pike/Session/SaveHandler/Doctrine.php b/lib/Pike/Session/SaveHandler/Doctrine.php index 0af7ac7..d4c1298 100644 --- a/lib/Pike/Session/SaveHandler/Doctrine.php +++ b/lib/Pike/Session/SaveHandler/Doctrine.php @@ -163,7 +163,7 @@ public function read($id) $modified = new DateTime($entity->getModified()); } - $duration = (new DateTime('now'))->getTimestamp() - $modified->getTimestamp(); + $duration = time() - $modified->getTimestamp(); if ($duration < $this->_lifetime) { $return = $entity->getData(); } else {