Browse Source

Merge pull request #4182 from dereuromark/master-cookie

Fix cookie reading.
Mark Story 11 years ago
parent
commit
53447fe2fb
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lib/Cake/Controller/Component/CookieComponent.php

+ 1 - 1
lib/Cake/Controller/Component/CookieComponent.php

@@ -284,7 +284,7 @@ class CookieComponent extends Component {
 			return null;
 		}
 
-		if (!empty($names[1])) {
+		if (!empty($names[1]) && is_array($this->_values[$this->name][$key])) {
 			return Hash::get($this->_values[$this->name][$key], $names[1]);
 		}
 		return $this->_values[$this->name][$key];