dg / dibi

Dibi - smart database abstraction layer

Home Page:https://dibiphp.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

If a custom driver is provided for Dibi Connection, the Translator instance is not created

czukowski opened this issue · comments

Version: 936f0ef

Bug Description

If a custom driver is provided for Dibi Connection, the function returns early and the Translator is not initialized.

final public function connect(): void
{
if ($this->config['driver'] instanceof Driver) {
$this->driver = $this->config['driver'];
return;
} elseif (is_subclass_of($this->config['driver'], Driver::class)) {

This causes the Connection instance to break with "Error: __clone method called on non-object" on query.