diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index 9262614c35..5eddc12ac9 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -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) diff --git a/framework/web/Request.php b/framework/web/Request.php index 4dc5118135..73985737f8 100644 --- a/framework/web/Request.php +++ b/framework/web/Request.php @@ -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); }