Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 0.2.0
-
Fix Version/s: 0.6.0
-
Component/s: Zend_Rest_Server, Zend_Server_Reflection
-
Labels:None
Description
When Zend_Rest_Server is handling a request the following error pops up:
Notice: Undefined variable: returnDesc in D:\apache\htdocs\dev\restful\library\incubator\library\Zend\Server\Reflection\Function\Abstract.php on line 352
It's printed just before the XML response (which is correct incidentally).
My response header:
Response Headers - http://localhost/dev/restful/service/note/user/8
Date: Sat, 11 Nov 2006 01:29:16 GMT
Server: Apache/2.2.3 (Win32) DAV/2 mod_ssl/2.2.3 OpenSSL/0.9.8c mod_autoindex_color PHP/5.1.6
X-Powered-By: PHP/5.1.6
Content-Length: 334
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: text/html
200 OK
For testing puposes I uploaded the code to the time of the error at:
http://game.patternsforphp.com/restful.tar.bz2 (328KB)
URI used is in the response header above (the user parameter is not used - but required to access the service).
Looking in the code for the Abstract.php, I note that $returnDesc is initialised inside an if...else statement. Assuming the first if condition is not met, this means the variable is never initialised at all and would lead to an undefined variable notice . See lines 273 (start if if statement), and 285 (variable initialisation) of the 0.20 released version of Zend_Server_Reflection_Function_Abstract. Might be a possible reason...
Same thing in SVN.
Assigning to Davey.