mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-09 17:57:38 +08:00
Fixes #9754: Fixed \yii\web\Request error when path info is empty
This commit is contained in:
committed by
Alexander Makarov
parent
56400add97
commit
dd818e17df
@ -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 #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 #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 #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 #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)
|
- 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)
|
- Enh #9635: Added default CSS class for `\yii\grid\ActionColumn` header (arogachev, dynasource)
|
||||||
|
|||||||
@ -723,7 +723,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[0] === '/') {
|
if (substr($pathInfo, 0, 1) === '/') {
|
||||||
$pathInfo = substr($pathInfo, 1);
|
$pathInfo = substr($pathInfo, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user