Fix #18472: Fix initializing db component configuration

This commit is contained in:
Bizley
2021-01-11 12:54:39 +01:00
committed by GitHub
parent e2f286e96d
commit f544883148
4 changed files with 17 additions and 7 deletions

View File

@ -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());
}
/**