diff --git a/lib/Cake/Controller/Component/CookieComponent.php b/lib/Cake/Controller/Component/CookieComponent.php index a062f565ab2..419d4694580 100644 --- a/lib/Cake/Controller/Component/CookieComponent.php +++ b/lib/Cake/Controller/Component/CookieComponent.php @@ -534,7 +534,7 @@ protected function _explode($string) { $first = substr($string, 0, 1); if ($first === '{' || $first === '[') { $ret = json_decode($string, true); - return ($ret) ? $ret : $string; + return ($ret !== null) ? $ret : $string; } $array = array(); foreach (explode(',', $string) as $pair) {