Fixed yii\grid\GridView::guessColumns() to work with numeric column names

Closes #10580
This commit is contained in:
SilverFire - Dmitry Naumenko
2016-01-15 13:35:08 +02:00
parent 25138d337c
commit eda1e7b027
2 changed files with 2 additions and 1 deletions

View File

@ -49,6 +49,7 @@ Yii Framework 2 Change Log
- Bug #10385: Fixed `yii\validators\CaptchaValidator` passed incorrect hashKey to JS validator when `captchaAction` begins with `/` (silverfire) - Bug #10385: Fixed `yii\validators\CaptchaValidator` passed incorrect hashKey to JS validator when `captchaAction` begins with `/` (silverfire)
- Bug #10467: Fixed `yii\di\Instance::ensure()` to work with minimum settings (LAV45) - Bug #10467: Fixed `yii\di\Instance::ensure()` to work with minimum settings (LAV45)
- Bug #10541: Fixed division by zero issue in `Console` helper progress bar (youmad) - Bug #10541: Fixed division by zero issue in `Console` helper progress bar (youmad)
- Bug #10580: Fixed `yii\grid\GridView::guessColumns()` to work with numeric column names (silverfire)
- Bug: Fixed generation of canonical URLs for `ViewAction` pages (samdark) - Bug: Fixed generation of canonical URLs for `ViewAction` pages (samdark)
- Bug: Fixed `mb_*` functions calls to use `UTF-8` or `Yii::$app->charset` (silverfire) - Bug: Fixed `mb_*` functions calls to use `UTF-8` or `Yii::$app->charset` (silverfire)
- Enh #3506: Added `yii\validators\IpValidator` to perform validation of IP addresses and subnets (SilverFire, samdark) - Enh #3506: Added `yii\validators\IpValidator` to perform validation of IP addresses and subnets (SilverFire, samdark)

View File

@ -569,7 +569,7 @@ class GridView extends BaseListView
$model = reset($models); $model = reset($models);
if (is_array($model) || is_object($model)) { if (is_array($model) || is_object($model)) {
foreach ($model as $name => $value) { foreach ($model as $name => $value) {
$this->columns[] = $name; $this->columns[] = (string) $name;
} }
} }
} }