mirror of
				https://github.com/yiisoft/yii2.git
				synced 2025-11-04 06:37:55 +08:00 
			
		
		
		
	Fixed yii\grid\GridView::guessColumns() to work with numeric column names
				
					
				
			Closes #10580
This commit is contained in:
		@ -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 #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 #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 `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)
 | 
			
		||||
 | 
			
		||||
@ -569,7 +569,7 @@ class GridView extends BaseListView
 | 
			
		||||
        $model = reset($models);
 | 
			
		||||
        if (is_array($model) || is_object($model)) {
 | 
			
		||||
            foreach ($model as $name => $value) {
 | 
			
		||||
                $this->columns[] = $name;
 | 
			
		||||
                $this->columns[] = (string) $name;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user