summaryrefslogtreecommitdiff
path: root/framework/Caching/TCache.php
diff options
context:
space:
mode:
authorxue <>2007-05-11 18:02:07 +0000
committerxue <>2007-05-11 18:02:07 +0000
commit03e68fbb15552cbdd658b62ebdef9eebbe7e03d5 (patch)
tree56022659919885ab3a128ff9ee9f80d3a6588cba /framework/Caching/TCache.php
parent4a6af98cfcf115219216b2f1102cc3785083c6c8 (diff)
fixed a potential TCache bug.
Diffstat (limited to 'framework/Caching/TCache.php')
-rw-r--r--framework/Caching/TCache.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/framework/Caching/TCache.php b/framework/Caching/TCache.php
index 44940d18..7c251629 100644
--- a/framework/Caching/TCache.php
+++ b/framework/Caching/TCache.php
@@ -122,6 +122,8 @@ abstract class TCache extends TModule implements ICache
if(($value=$this->getValue($this->generateUniqueKey($id)))!==false)
{
$data=unserialize($value);
+ if(!is_array($value))
+ return false;
if(!($data[1] instanceof ICacheDependency) || !$data[1]->getHasChanged())
return $data[0];
}