From 03e68fbb15552cbdd658b62ebdef9eebbe7e03d5 Mon Sep 17 00:00:00 2001 From: xue <> Date: Fri, 11 May 2007 18:02:07 +0000 Subject: fixed a potential TCache bug. --- framework/Caching/TCache.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'framework/Caching') 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]; } -- cgit v1.2.3