Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.8.4
-
Fix Version/s: 1.9.2
-
Component/s: Zend_Cache
-
Labels:None
Description
Using Zend_Cache_Backend_ZendServer_ShMem or Zend_Cache_Backend_ZendServer_Disk as back end throws an exception when testing if id is already in the cache.
Here is the test method:
public function test($id) { $tmp = $this->_fetch('internal-metadatas---' . $id); if ($tmp !== null) { if (!is_array($tmp) || !isset($tmp['mtime'])) { Zend_Cache::throwException('Cache metadata for \'' . $id . '\' id is corrupted' ); } return $tmp['mtime']; } return false; }
The problem is in that first if. _fetch() calls zend_shm_cache_fetch() and zend_disk_cache_fetch respectively which will return false if the item is not found (http://files.zend.com/help/Zend-Server/zenddatacache.html).
The If-Statement should be if ($tmp !== false).
Solved in SVN r17671