Fix cookie reading.

This commit is contained in:
euromark 2014-08-06 22:53:54 +02:00
parent dda4933ed0
commit 5f5218f3b2

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