Issues

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

Description


    /**
     * 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:


    public function getPath()
    {
        return strlen($this->_path) > 0 ? $this->_path : false;
    }

Comments

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

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

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