From b8e93d8c446c122d9bb6daf134d6ea48790cd607 Mon Sep 17 00:00:00 2001 From: vAugagneur Date: Fri, 30 Nov 2012 09:35:42 +0100 Subject: [PATCH] //small cookie expire fix --- classes/Cookie.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/Cookie.php b/classes/Cookie.php index 6a242b820..117b5cfd9 100644 --- a/classes/Cookie.php +++ b/classes/Cookie.php @@ -63,7 +63,7 @@ class CookieCore public function __construct($name, $path = '', $expire = null, $shared_urls = null) { $this->_content = array(); - $this->_expire = isset($expire) ? (int)($expire) : (time() + 1728000); + $this->_expire = is_null($expire) ? time() + 1728000 : (int)$expire; $this->_name = md5(_PS_VERSION_.$name); $this->_path = trim(Context::getContext()->shop->physical_uri.$path, '/\\').'/'; if ($this->_path{0} != '/') $this->_path = '/'.$this->_path;