Merge pull request #2605 from willmorgan/cachetofile-false-fix

Strict type check for null cache values
This commit is contained in:
Will Rossiter 2013-10-24 17:49:44 -07:00
commit 7361d0a6ac

View File

@ -1077,10 +1077,12 @@ abstract class Object {
if($ID) $cacheName .= '_' . $ID; if($ID) $cacheName .= '_' . $ID;
if(count($arguments)) $cacheName .= '_' . md5(serialize($arguments)); if(count($arguments)) $cacheName .= '_' . md5(serialize($arguments));
if($data = $this->loadCache($cacheName, $lifetime)) { $data = $this->loadCache($cacheName, $lifetime);
if($data !== false) {
return $data; return $data;
} }
$data = call_user_func_array(array($this, $method), $arguments); $data = call_user_func_array(array($this, $method), $arguments);
$this->saveCache($cacheName, $data); $this->saveCache($cacheName, $data);