ZF-11162: Zend_Http_Client::setUri mutates argument

Issue Type: Bug Created: 2011-03-11T00:32:55.000+0000 Last Updated: 2011-08-01T11:00:51.000+0000 Status: Resolved Fix version(s): - 1.11.10 (04/Aug/11)

Reporter: Gerard van Helden (drm) Assignee: Enrico Zimuel (zimuel) Tags: - Zend_Http_Client

  • Zend_Uri

Related issues: Attachments: - zend-http-client.patch


Zend_Http_Client::setUri (and therefore the constructor) mutates the passed Zend_Uri_Http object by changing the port number if it is not set to the default. Furthermore, setting parameters etc, will mutate the originally passed argument too. Imho this shouldn't be the case, the passed argument should be const, and if Zend_Http_Client wishes to adopt the instance, it should be cloned.

I'll be providing a patch and a test here.


Posted by Gerard van Helden (drm) on 2011-03-11T00:34:44.000+0000

Test & patch

Posted by Enrico Zimuel (zimuel) on 2011-08-01T10:48:38.000+0000

Committed in trunk (24334)

Posted by Enrico Zimuel (zimuel) on 2011-08-01T11:00:51.000+0000

Solved in branches/release-1.11 (commit 24335)

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.