Issues

ZF-8395: Undefined offset 0 in Zend_Cache_Backend_Memcached

Description

In test my progect I haved notice {color:red} "Notice: Undefined offset: 0 in /usr/local/share/ZendFramework/library/Zend/Cache/Backend/Memcached.php on line 182"{color} .

For fix it I added check for the existence of the zero element to Zend_Cache_Backend_Memcached::load()

    public function load($id, $doNotTestCacheValidity = false)
    {
        $tmp = $this->_memcache->get($id);
        if (is_array($tmp) && isset($tmp[0])) {
            return $tmp[0];
        }
        return false;
    }

Comments

No comments to display