Zend Framework

getParams() ignores Zend_Controller_Request::setParamSources()

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.7.0
  • Fix Version/s: 1.9.3
  • Component/s: Zend_Controller
  • Labels:
    None

Description

Here is a working version that does not ignore paramSources:

public function getParams()
{
$return = $this->_params;
$paramSources = $this->getParamSources();
if (in_array('_GET', $paramSources) && isset($_GET) && is_array($_GET)) { $return += $_GET; }
if (in_array('_POST', $paramSources) && isset($_POST) && is_array($_POST)) { $return += $_POST; }
return $return;
}

Activity

Hide
julien PAULI added a comment -

I agree

Show
julien PAULI added a comment - I agree
Hide
Travis Pew added a comment -

This does appear to be a bug since getParam() honors the values in setParamSources(). I've attached a patch with a new unit test and an update to getParams()

Show
Travis Pew added a comment - This does appear to be a bug since getParam() honors the values in setParamSources(). I've attached a patch with a new unit test and an update to getParams()
Hide
Matthew Weier O'Phinney added a comment -

Fixed in trunk and 1.9 release branch

Show
Matthew Weier O'Phinney added a comment - Fixed in trunk and 1.9 release branch

People

Vote (1)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: