From b9df48d48c72558aff58d826158e42fc6cb774c3 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Fri, 11 Jul 2014 15:53:31 +0200 Subject: [PATCH] Fix http://www.dolibarr.fr/forum/527-bugs-sur-la-version-stable-courante/50854-multi-societe-options-cookies --- htdocs/core/class/cookie.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/cookie.class.php b/htdocs/core/class/cookie.class.php index a45aaeb2423..39d27d9a332 100644 --- a/htdocs/core/class/cookie.class.php +++ b/htdocs/core/class/cookie.class.php @@ -91,7 +91,9 @@ class DolCookie $num = (count($this->cookiearray) - 2); for ($f = 0; $f <= $num; $f++) { - $this->myValue .= strval(chr($this->cookiearray[$f]/$this->myKey)); + if (!empty($this->myKey)) { + $this->myValue .= strval(chr($this->cookiearray[$f]/$this->myKey)); + } } return(base64_decode($this->myValue));