ZF-12452: Zend_Json_Server parameter default value NULL'd

Issue Type: Bug Created: 2012-10-23T18:18:06.000+0000 Last Updated: 2012-11-06T21:21:07.000+0000 Status: Resolved Fix version(s): - 1.12.1 (18/Dec/12)

Reporter: Dejan Marjanovic (dejan) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend_Json_Server

Related issues: Attachments:


Zend_Json_Server, line of code 550, default parameter is NULL'd even if it exists with value other than NULL, which can cause major issues.

<pre class="highlight">
$orderedParams[$refParam->getName()] = null;

Should be:

<pre class="highlight">
$orderedParams[$refParam->getName()] = $refParam->getDefaultValue();

Dejan, Site5


Posted by Rob Allen (rob) on 2012-11-06T21:05:47.000+0000

Are you able to provide example code that shows this problem?

Posted by Rob Allen (rob) on 2012-11-06T21:11:58.000+0000

Actually, I can see that this needs fixing by inspection!

Posted by Rob Allen (rob) on 2012-11-06T21:12:15.000+0000

Fixed on trunk (25084) and release-1.12 (25085)

Posted by Dejan Marjanovic (dejan) on 2012-11-06T21:21:07.000+0000

Yes Sir, I would be happy to provide code but as you can see, it is pretty obvious that it gets null'd regardless of default value. I've tested it numerous times and then rewritten entire _handle method because of some other implementation issues. Thanks!

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.