ZF-9428: Empty MemCached throws on getFillingPercentage

Description

Due to the logic


        if (!$memSize || !$memUsed) {
            Zend_Cache::throwException('Can\'t get filling percentage');
        }

The following code will throw an error rather then return 0


$memCache->clean(Zend_Cache::CLEANING_MODE_ALL);
echo $memCache->getFillingPercentage();

Comments

I can confirm this issue. In our Zend Framework application using Backend, when the cache is cold we get really nasty can't get filling percentage errors. This only occurs when the cache is completely empty, when something is added it starts running normally again.

In regards to my comment, here is some information:

PHP Version 5.2.10-2ubuntu6.4 Zend Version 1.10.1

apache/2.2.12 (Ubuntu)

Assigned component

I committed a fix in trunk on r21519. Please check if it is working fine for you.

Yes! The fix in the trunk corrected the problem

fixed in r21519 (trunk) & r21535 (1.10 branch)