Fixes #9754: Fixed \yii\web\Request error when path info is empty

This commit is contained in:
Boudewijn Vahrmeijer
2015-09-23 10:57:07 +02:00
committed by Alexander Makarov
parent 56400add97
commit dd818e17df
2 changed files with 2 additions and 1 deletions

View File

@ -14,6 +14,7 @@ Yii Framework 2 Change Log
- Bug #9591: Fixed `yii.validation.js` code so it is compressable by YUICompressor (samdark, hofrob)
- Bug #9596: Fixed `\yii\web\UrlManager::createAbsoluteUrl(['site/index', '#' => 'testHash'])` losing hash (alchimik, samdark)
- Bug #9678: `I18N::format()` wasn't able to handle named placeholder in "selectordinal" (samdark)
- Bug #9754: Fixed `\yii\web\Request` error when path info is empty (dynasource)
- Chg #9369: `Yii::$app->user->can()` now returns `false` instead of erroring in case `authManager` component is not configured (creocoder)
- Chg #9411: `DetailView` now automatically sets container tag ID in case it's not specified (samdark)
- Enh #9635: Added default CSS class for `\yii\grid\ActionColumn` header (arogachev, dynasource)

View File

@ -723,7 +723,7 @@ class Request extends \yii\base\Request
throw new InvalidConfigException('Unable to determine the path info of the current request.');
}
if ($pathInfo[0] === '/') {
if (substr($pathInfo, 0, 1) === '/') {
$pathInfo = substr($pathInfo, 1);
}