ZF-7296: Zend_Uri_Http::getPath should return false when no path exists, returns / instead

Issue Type: Bug Created: 2009-07-16T13:02:14.000+0000 Last Updated: 2010-11-19T11:56:44.000+0000 Status: Resolved Fix version(s): - 1.11.1 (30/Nov/10)

Reporter: Cole Snodgrass (cole.snodgrass) Assignee: Marc Hodgins (mjh_ca) Tags: - Zend_Uri

Related issues: Attachments: - ZF-7296.patch


<pre class="highlight">
     * Returns the path and filename portion of the URL, or FALSE if none.
     * @return string
    public function getPath()
        return strlen($this->_path) > 0 ? $this->_path : '/';

needs to be updated to:

<pre class="highlight">
    public function getPath()
        return strlen($this->_path) > 0 ? $this->_path : false;


Posted by Marc Hodgins (mjh_ca) on 2010-11-05T00:15:57.000+0000

More of a docblock problem, IMO. Patch is attached.

Changing behavior to return false would be a big BC break that isn't necessary.

Posted by Marc Hodgins (mjh_ca) on 2010-11-19T11:56:44.000+0000

Patch applied to trunk in r23408, merged to 1.11 release branch in r23409.

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.