diff --git a/framework/yii/data/ActiveDataProvider.php b/framework/yii/data/ActiveDataProvider.php index df568a8..2292286 100644 --- a/framework/yii/data/ActiveDataProvider.php +++ b/framework/yii/data/ActiveDataProvider.php @@ -86,9 +86,9 @@ class ActiveDataProvider extends BaseDataProvider parent::init(); if (is_string($this->db)) { $this->db = Yii::$app->getComponent($this->db); - } - if ($this->db === null) { - throw new InvalidConfigException('The "db" property must be a valid DB Connection application component.'); + if ($this->db === null) { + throw new InvalidConfigException('The "db" property must be a valid DB Connection application component.'); + } } }