Browse Source

Fixes #632.

tags/2.0.0-beta
Qiang Xue 12 years ago
parent
commit
40b6b607c8
  1. 2
      framework/yii/helpers/base/Html.php

2
framework/yii/helpers/base/Html.php

@ -1398,7 +1398,7 @@ class Html
return Yii::$app->getRequest()->getUrl(); return Yii::$app->getRequest()->getUrl();
} else { } else {
$url = Yii::getAlias($url); $url = Yii::getAlias($url);
if ($url[0] === '/' || $url[0] === '#' || strpos($url, '://')) { if ($url !== '' && ($url[0] === '/' || $url[0] === '#' || strpos($url, '://'))) {
return $url; return $url;
} else { } else {
return Yii::$app->getRequest()->getBaseUrl() . '/' . $url; return Yii::$app->getRequest()->getBaseUrl() . '/' . $url;

Loading…
Cancel
Save