Add array cast for method_cache data.

Fixes #4186
This commit is contained in:
mark_story 2014-09-02 22:39:28 -04:00
parent 9c2a25d4c0
commit 638d2ea7b6

View file

@ -776,7 +776,7 @@ class DboSource extends DataSource {
return $value;
}
if (!$this->_methodCacheChange && empty(self::$methodCache)) {
self::$methodCache = Cache::read('method_cache', '_cake_core_');
self::$methodCache = (array)Cache::read('method_cache', '_cake_core_');
}
if ($value === null) {
return (isset(self::$methodCache[$method][$key])) ? self::$methodCache[$method][$key] : null;