Zend Framework

Zend_Uri_Http::fromString doesn't import Zend_Uri_Exception

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.6.1
  • Fix Version/s: 1.7.0
  • Component/s: Zend_Uri
  • Labels:
    None

Description

In Zend_Uri_Http::fromString, if the scheme is not valid, it throws a Zend_Uri_Exception, but fails to require_once 'Zend/Uri/Exception.php' prior to doing this.

Zend/Uri/Http.php#160
if (in_array($scheme, array('http', 'https')) === false) {
    throw new Zend_Uri_Exception("Invalid scheme: '$scheme'");
}

should be

if (in_array($scheme, array('http', 'https')) === false) {
        require_once 'Zend/Uri/Exception.php';
        throw new Zend_Uri_Exception("Invalid scheme: '$scheme'");
}

Activity

Hide
Shahar Evron added a comment -

Fixed in rev. 11866, test added

Show
Shahar Evron added a comment - Fixed in rev. 11866, test added
Hide
Alexander Veremyev added a comment -

Merged into release-1.6 branch at r11890

Show
Alexander Veremyev added a comment - Merged into release-1.6 branch at r11890
Hide
Wil Sinclair added a comment -

Changing issues in preparation for the 1.7.0 release.

Show
Wil Sinclair added a comment - Changing issues in preparation for the 1.7.0 release.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: