Url::normalize() shouldn't be prepending anything to empty strings

This commit is contained in:
Chris Morgan
2007-06-11 01:27:29 +00:00
committed by WineHQ
parent 74ccc53af3
commit 4b8b4b6f57

View File

@@ -502,6 +502,10 @@ class Url {
// and prepend "http://" // and prepend "http://"
function normalize($sTheUrl) function normalize($sTheUrl)
{ {
// return if we have an empty string
if($sTheUrl == "")
return $sTheUrl;
// if we already have "://" in the url // if we already have "://" in the url
// we can leave the url alone // we can leave the url alone
if(strpos($sTheUrl, "://") === false) if(strpos($sTheUrl, "://") === false)