Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.7.2
-
Fix Version/s: None
-
Component/s: Zend_Amf
-
Labels:
Description
Zend_Amf_Server of ZF version 1.7.2 throws an exception when the addFunction() method is called with a callback containing an object instance method as in the following:
$server = new Zend_Amf_Server();
$server->addFunction(array($object, 'somePublicAMFResponderMethod'));
The exception message is simply "Unable to attach function".
It's clear within the addFunction() body why this occurs (for the first array element of $function, $func is an object, not a string or function):
$function = (array) $function;
foreach ($function as $func) {
if (!is_string($func) || !function_exists($func)) {
require_once 'Zend/Amf/Server/Exception.php';
throw new Zend_Amf_Server_Exception('Unable to attach function');
}
$this->_methods[] = Zend_Server_Reflection::reflectFunction($func, $argv, $namespace);
}
Hi, Darby.
Do you mean each message should be different one?
For example,
the parameter is not string nor array,
the parameter is not function name... etc