Zend Framework

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

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.7.4, 1.7.5, 1.7.6, 1.7.7, 1.7.8, 1.8.0, 1.8.1, 1.8.2, 1.8.3, 1.8.4
  • Fix Version/s: 1.11.1
  • Component/s: Zend_Uri
  • Labels:
    None

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;
    }

Activity

Hide
Marc Hodgins added a comment -

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

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

Show
Marc Hodgins added a comment - More of a docblock problem, IMO. Patch is attached. Changing behavior to return false would be a big BC break that isn't necessary.
Hide
Marc Hodgins added a comment -

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

Show
Marc Hodgins added a comment - Patch applied to trunk in r23408, merged to 1.11 release branch in r23409.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: