ZF-6239: Feature introduced in ZF-5938 breaks backwards compatibility in Memcached cache backend

Issue Type: Bug Created: 2009-04-08T05:27:48.000+0000 Last Updated: 2009-04-08T17:45:00.000+0000 Status: Resolved Fix version(s): - 1.8.0 (30/Apr/09)

Reporter: Mikko Koppanen (mkoppanen) Assignee: Fabien MARTY (fab) Tags: - Zend_Cache

Related issues: - ZF-5938



1.8.0 pre-release introduced the failure callback functionality on the Memcached cache backend. The constant DEFAULT_FAILURE_CALLBACK defines that by default the callback is empty string (it will be empty with almost all applications since this is new functionality).

Memcache extension however does the following check:… line 2045: if (failure_callback != NULL && Z_TYPE_P(failure_callback) != IS_NULL) {

If failure callback is something else than NULL the extension then checks if the function is callable. Naturally empty string is not callable and that causes memcache extension to return false (which btw the cache backend doesnt check) and the server does not get added to the pool. Since the functionality is imposed by default this causes failure on all applications that use memcached backend without defining failure_callback.


Posted by Fabien MARTY (fab) on 2009-04-08T11:29:06.000+0000

just fixed in SVN trunk (I changed the default value (empty string) to null)


please reopen if you still have a problem

Posted by old of Satoru Yoshida ( on 2009-04-08T17:44:58.000+0000

Thank you , Fabien and Mikko!

Have you found an issue?

See the Overview section for more details.


© 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.