mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-02 21:41:19 +08:00
Fix #18472: Fix initializing db component configuration in yii\data\ActiveDataProvider
This commit is contained in:
@ -6,6 +6,7 @@ Yii Framework 2 Change Log
|
||||
|
||||
- Enh #18447: Do not use `getLastInsertID` to get PK from insert query to lower collision probability for concurrent inserts (darkdef)
|
||||
- Bug #18448: Fix issues in queries and tests for older MSSQL versions (darkdef)
|
||||
- Bug #18472: Fix initializing `db` component configuration in `yii\data\ActiveDataProvider` (bizley)
|
||||
|
||||
|
||||
2.0.40 December 23, 2020
|
||||
|
||||
@ -88,7 +88,7 @@ class ActiveDataProvider extends BaseDataProvider
|
||||
public function init()
|
||||
{
|
||||
parent::init();
|
||||
if (is_string($this->db)) {
|
||||
if ($this->db !== null) {
|
||||
$this->db = Instance::ensure($this->db, Connection::className());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user