// Fix #PSCFV-4468

This commit is contained in:
rGaillard
2012-09-28 13:08:48 +00:00
parent f0d0a98bef
commit f0bf2da7e3
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);
}