Zend Framework

Zend_Server_Reflection_Function_Abstract Undefined variable Notice

Details

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.

Activity

Hide
Bill Karwin added a comment -

Assigning to Davey.

Show
Bill Karwin added a comment - Assigning to Davey.
Hide
Matthew Weier O'Phinney added a comment -

Resolved in revision 1965. $returnDesc was initialised incorrectly.

Show
Matthew Weier O'Phinney added a comment - Resolved in revision 1965. $returnDesc was initialised incorrectly.
Hide
Matthew Weier O'Phinney added a comment -

Removed Zend_Service_Server dependency and changed to Zend_Server_Reflection

Show
Matthew Weier O'Phinney added a comment - Removed Zend_Service_Server dependency and changed to Zend_Server_Reflection

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: