Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 1.10.5
-
Fix Version/s: 1.10.7
-
Component/s: Zend_Cache
-
Labels:None
Description
When using call like in the call_user_func_array docs example http://php.net/manual/en/function.call-user-func-array.php, 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);
}
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));
}