fixed url helper to not prepend to relative URLs

This commit is contained in:
Carsten Brandt
2014-03-23 21:32:42 +01:00
parent a9e37b906c
commit 94fb8672d1

View File

@ -193,7 +193,7 @@ class BaseUrl
if ($url === '') {
$url = Yii::$app->getRequest()->getUrl();
} elseif ($url[0] !== '/' && $url[0] !== '#' && strpos($url, '://') === false) {
} elseif ($url[0] !== '/' && $url[0] !== '#' && strpos($url, '://') === false && strncmp($url, './', 2) !== 0) {
$url = Yii::$app->getRequest()->getBaseUrl() . '/' . $url;
}