Zend Framework

Zend_Controller_Action::_getParam() incorrectly assigns default value

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Critical Critical
  • Resolution: Fixed
  • Affects Version/s: 1.9.6
  • Fix Version/s: 1.9.7
  • Component/s: Zend_Controller
  • Labels:
    None

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.

Issue Links

Activity

Hide
Ken Stanley added a comment -

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.

Show
Ken Stanley added a comment - 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.
Hide
Ramon Henrique Ornelas added a comment -

Resolved in r19763

Show
Ramon Henrique Ornelas added a comment - Resolved in r19763

People

Vote (1)
Watch (4)

Dates

  • Created:
    Updated:
    Resolved: