From ebdd56f0dba332256ab8b2aee80c44fcde6e022f Mon Sep 17 00:00:00 2001 From: Alexander Makarov Date: Thu, 27 Nov 2014 20:42:31 +0300 Subject: [PATCH] Changed #4277 behavior --- framework/CHANGELOG.md | 2 +- framework/grid/GridView.php | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index 6943c14e83..5fcedc463e 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -72,7 +72,7 @@ Yii Framework 2 Change Log - Enh: `yii\rbac\DbManager` migration now uses database component specified in component settings instead of always using default `db` (samdark) - Enh: Added `yii\base\Controller::renderContent()` (qiangxue) - Chg #3630: `yii\db\Command::queryInternal()` is now protected (samdark) -- Chg #4277: `yii\grid\GridView` is no longer throwing an exception in non-debug mode when results are empty and `columns` aren't defined (samdark) +- Chg #4277: `yii\grid\GridView` is no longer throwing an exception when results are empty and `columns` aren't defined (samdark) - Chg #5508: Dropped the support for the `--append` option for the `fixture` command (qiangxue) - Chg #5874: Upgraded Twitter Bootstrap to 3.3.x (samdark) diff --git a/framework/grid/GridView.php b/framework/grid/GridView.php index b88eb14c4b..ae8ddc8fce 100644 --- a/framework/grid/GridView.php +++ b/framework/grid/GridView.php @@ -522,8 +522,6 @@ class GridView extends BaseListView foreach ($model as $name => $value) { $this->columns[] = $name; } - } elseif (YII_DEBUG) { - throw new InvalidConfigException('Unable to generate columns from the data. Please manually configure the "columns" property.'); } } }