Issues

ZF-8638: Zend_Controller_Action::_getParam() incorrectly assigns default value

Issue Type: Bug Created: 2009-12-26T19:42:34.000+0000 Last Updated: 2010-02-07T18:58:44.000+0000 Status: Resolved Fix version(s): - 1.9.7 (11/Jan/10)

Reporter: Ken Stanley (dohpaz) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend_Controller

Related issues: - ZF-5163

Attachments: - Zend_Controller_Action.patch

Description

If I have a parameter in the request object that has a value of boolean false (set by a route), and I pass in a default value, the default value will always be set if the parameter is boolean false. This is because the first part of the condition in Zend_Controller_Action::_getParam() does an Equal comparison, when it should be doing an Identical comparison. Attached is a patch that correctly fixes the issue.

Comments

Posted by Ken Stanley (dohpaz) on 2009-12-26T19:43:49.000+0000

This patch changes the first part of the condition to check for whether or not to use the default value from using an Equal (==) comparison, to an Identical (===) comparison.

Posted by Ramon Henrique Ornelas (ramon) on 2010-02-04T10:13:02.000+0000

Resolved in r19763

Have you found an issue?

See the Overview section for more details.

Copyright

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

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

Contacts