ZF-5107: getParams() ignores Zend_Controller_Request::setParamSources()

Issue Type: Bug Created: 2008-11-30T01:29:48.000+0000 Last Updated: 2009-09-18T11:56:21.000+0000 Status: Resolved Fix version(s): - 1.9.3 (22/Sep/09)

Reporter: Brian Wung (dosgrandebeans) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend_Controller

Related issues: Attachments: - ZF-5107.diff


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;


Posted by julien PAULI (doctorrock83) on 2008-12-02T04:08:08.000+0000

I agree

Posted by Travis Pew (travisp) on 2009-09-18T07:56:01.000+0000

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()

Posted by Matthew Weier O'Phinney (matthew) on 2009-09-18T11:56:21.000+0000

Fixed in trunk and 1.9 release branch

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.