Issues

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:

Description

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

Comments

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.

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