ZF-11347: Zend_Controller_Request_Http store query in superglobal and can be setted

Issue Type: Bug Created: 2011-05-05T17:36:51.000+0000 Last Updated: 2011-08-20T16:39:20.000+0000 Status: Resolved Fix version(s): Reporter: Martin Panel (xorax) Assignee: Pádraic Brady (padraic) Tags: - Zend_Controller

  • zf-crteam-padraic
  • zf-crteam-priority

Related issues: Attachments:


setQuery() and setPost() method add param in $_GET and $_POST superglobals. So query and post are not properties of Requests, and so this method must be static Or Considering query and post are properties of Requests, and so they must be stored in, I think so. Else Request is design to be use one time and so must make a singleton pattern.

Example : $request = new Zend_Controller_Http_Request();

$requestBis = clone $request; $requestBis->setQuery('__mykey', 'myvalue');

echo $request->getQuery('__mykey', 'novalue');

Actual result : myvalue Expected result: novalue


Posted by Pádraic Brady (padraic) on 2011-08-20T16:39:20.000+0000

It's not the prettiest situation, however changing the global behaviour would be a backwards incompatible change for those relying on it. As such, I'm marking the issue won't-fix.

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.