ZF-7358: Zend_Cache_Backend_ZendServer_ShMem and Zend_Cache_Backend_ZendServer_Disk throws an exception in test()

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/…). The If-Statement should be if ($tmp !== false).

Comments

Solved in SVN r17671