Issues

ZF-8395: Undefined offset 0 in Zend_Cache_Backend_Memcached

Issue Type: Bug Created: 2009-11-25T15:47:46.000+0000 Last Updated: 2009-11-25T22:16:41.000+0000 Status: Resolved Fix version(s): - 1.10.0 (27/Jan/10)

Reporter: Stepan Tanasiychuk (stfalcon) Assignee: Marco Kaiser (bate) Tags: - Zend_Cache

Related issues: Attachments:

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()

<pre class="highlight">    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

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts