// Fix #PSCFV-4468

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@17608 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rGaillard
2012-09-28 13:08:48 +00:00
parent f9e44fadfa
commit dfa8f7bf01
7 changed files with 25 additions and 17 deletions
+5 -3
View File
@@ -318,8 +318,7 @@ class CookieCore
public function __destruct()
{
if ($this->_modified)
$this->write();
$this->write();
}
/**
@@ -327,6 +326,9 @@ class CookieCore
*/
public function write()
{
if (!$this->_modified || headers_sent())
return;
$cookie = '';
/* Serialize cookie content */
@@ -336,7 +338,7 @@ class CookieCore
/* Add checksum to cookie */
$cookie .= 'checksum|'.crc32($this->_iv.$cookie);
$this->_modified = false;
/* Cookies are encrypted for evident security reasons */
return $this->_setcookie($cookie);
}