Merge pull request #4182 from dereuromark/master-cookie

Fix cookie reading.
This commit is contained in:
Mark Story 2014-08-06 17:38:59 -04:00
commit 53447fe2fb

View file

@ -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];