From e8a80af4132bc200dc61a82b5e522ec1e5390086 Mon Sep 17 00:00:00 2001 From: Alexander Makarov Date: Tue, 7 Jan 2014 12:57:38 +0400 Subject: [PATCH] fixes #1811 --- framework/yii/web/Request.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/framework/yii/web/Request.php b/framework/yii/web/Request.php index b8c2a592c7..f2298e6a4e 100644 --- a/framework/yii/web/Request.php +++ b/framework/yii/web/Request.php @@ -584,7 +584,9 @@ class Request extends \yii\base\Request throw new InvalidConfigException('Unable to determine the path info of the current request.'); } - if ($pathInfo[0] === '/') { + if ($pathInfo === '/') { + $pathInfo = ''; + } else if ($pathInfo[0] === '/') { $pathInfo = substr($pathInfo, 1); }