Combined $schema and $absolute into $schema

This commit is contained in:
Alexander Makarov
2014-03-10 20:29:24 +04:00
parent 577f8a5c50
commit bddad5280c
2 changed files with 39 additions and 25 deletions

View File

@@ -294,7 +294,7 @@ class UrlManager extends Component
if (strpos($url, '://') === false) {
$url = $this->getHostInfo() . $url;
}
if ($schema !== null && ($pos = strpos($url, '://')) !== false) {
if ($schema && ($pos = strpos($url, '://')) !== false) {
$url = $schema . substr($url, $pos);
}
return $url;