mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-02 13:02:24 +08:00
Fix #18472: Fix initializing db component configuration
This commit is contained in:
@ -88,9 +88,7 @@ class ActiveDataProvider extends BaseDataProvider
|
||||
public function init()
|
||||
{
|
||||
parent::init();
|
||||
if ($this->db !== null) {
|
||||
$this->db = Instance::ensure($this->db, Connection::className());
|
||||
}
|
||||
$this->db = Instance::ensure($this->db === null ? 'db' : $this->db, Connection::className());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user