ZF-8244: Tiny improvement

Description

Truly tiny change to Zend_Soap_Server::validateUrn()


        $segs = parse_url($urn);
        if (isset($segs['scheme'])) {
            return true;
        }

    if (!!parse_url($urn, PHP_URL_SCHEME)) {
        return true;
    }

Using ...


php -r "var_dump(!!parse_url('http://framework.zend.com', PHP_URL_SCHEME));"
php -r "var_dump(!!parse_url('framework.zend.com', PHP_URL_SCHEME));"
php -r "var_dump(!!parse_url('http:///////framework.zend.com', PHP_URL_SCHEME));"

Outputs ...


bool(true)
bool(false)
Warning: parse_url(http:///////framework.zend.com): Unable to parse URL in Command line code on line 1
bool(false)

So, like I said, truly minor.

Regards,

Richard Quadling.

Comments

I find similar issues in following;

validateUrn($urn) in Zend_Soap_Client

dir_opendir($path, $options) in Zend_Service_Amazon_S3_Stream

Solved SVN r18888 in trunk for Zend_Soap_Client and Zend_Soap_Server

Solved SVN r18889 in trunk for Zend_Service_Amazon_S3_Stream