ZF-9979: Function Cache makeid 'Incorrect function name'

Issue Type: Improvement Created: 2010-06-11T03:36:25.000+0000 Last Updated: 2010-06-30T10:35:11.000+0000 Status: Closed Fix version(s): - 1.10.7 (28/Jul/10)

Reporter: Mauro Asprea (brutuscat) Assignee: Marc Bennewitz (private) (mabe) Tags: - Zend_Cache

Related issues: - ZF-9422



When using call like in the call_user_func_array docs example…, if we try to call the method of an object, it throws Zend_Cache::throwException('Incorrect function name');

Example: $api = new MyApi(); $xml = $cache->call(array($api, 'searchProducts'), $args);

So I would modify the "incorrect..." by this: if (!is_string($name)) { //Zend_Cache::throwException('Incorrect function name'); $name = print_r($name, true); }


Posted by Mauro Asprea (brutuscat) on 2010-06-25T03:39:00.000+0000

To clarify, this is how the _makeid of the Zend_Cache_Frontend_Function should look like:

private function _makeId($name, $parameters)
    if (!is_string($name)) {
        //Zend_Cache::throwException('Incorrect function name');
        $name = print_r($name, true);
    if (!is_array($parameters)) {
        Zend_Cache::throwException('parameters argument must be an array');
    return md5($name . serialize($parameters));

Posted by Marc Bennewitz (private) (mabe) on 2010-06-29T10:21:07.000+0000

I committed some changes to the function frontend to allow all types of callbacks. (r22503 @ trunk)

Please tell me if it will close your issue.

Posted by Marc Bennewitz (private) (mabe) on 2010-06-30T10:06:32.000+0000

fixed in r22504 (1.10 branch) & r22503 (trunk)

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.