Zend Framework

Undefined offset 0 in Zend_Cache_Backend_Memcached

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.9.6
  • Fix Version/s: 1.10.0
  • Component/s: Zend_Cache
  • Labels:
    None

Description

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

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;
    }

Activity

There are no comments yet on this issue.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: