Commit 6e716513 by Alexander Makarov

Fixes #1991: regression in index.php handling

parent b312b853
...@@ -584,9 +584,7 @@ class Request extends \yii\base\Request ...@@ -584,9 +584,7 @@ class Request extends \yii\base\Request
throw new InvalidConfigException('Unable to determine the path info of the current request.'); throw new InvalidConfigException('Unable to determine the path info of the current request.');
} }
if ($pathInfo === '/') { if ($pathInfo[0] === '/') {
$pathInfo = '';
} else if ($pathInfo[0] === '/') {
$pathInfo = substr($pathInfo, 1); $pathInfo = substr($pathInfo, 1);
} }
......
...@@ -214,7 +214,7 @@ class UrlManager extends Component ...@@ -214,7 +214,7 @@ class UrlManager extends Component
} }
} }
return [$pathInfo, []]; return [(string)$pathInfo, []];
} else { } else {
Yii::trace('Pretty URL not enabled. Using default URL parsing logic.', __METHOD__); Yii::trace('Pretty URL not enabled. Using default URL parsing logic.', __METHOD__);
$route = $request->get($this->routeVar); $route = $request->get($this->routeVar);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment