Skip to content

Commit

Permalink
Add array cast for method_cache data.
Browse files Browse the repository at this point in the history
Fixes #4186
  • Loading branch information
markstory committed Sep 3, 2014
1 parent 9c2a25d commit 638d2ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Cake/Model/Datasource/DboSource.php
Expand Up @@ -776,7 +776,7 @@ public function cacheMethod($method, $key, $value = null) {
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;
Expand Down

0 comments on commit 638d2ea

Please sign in to comment.