diff --git a/lib/Cake/Controller/Component/CookieComponent.php b/lib/Cake/Controller/Component/CookieComponent.php index a062f565a..419d46945 100644 --- a/lib/Cake/Controller/Component/CookieComponent.php +++ b/lib/Cake/Controller/Component/CookieComponent.php @@ -534,7 +534,7 @@ class CookieComponent extends Component { $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) {