Commit 6e716513 by Alexander Makarov

Fixes #1991: regression in index.php handling

parent b312b853
......@@ -584,9 +584,7 @@ class Request extends \yii\base\Request
throw new InvalidConfigException('Unable to determine the path info of the current request.');
}
if ($pathInfo === '/') {
$pathInfo = '';
} else if ($pathInfo[0] === '/') {
if ($pathInfo[0] === '/') {
$pathInfo = substr($pathInfo, 1);
}
......
......@@ -214,7 +214,7 @@ class UrlManager extends Component
}
}
return [$pathInfo, []];
return [(string)$pathInfo, []];
} else {
Yii::trace('Pretty URL not enabled. Using default URL parsing logic.', __METHOD__);
$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