Dibi\DriverException #1045
File: .../vendor/dibi/dibi/src/Dibi/Drivers/MySqliDriver.php:96
86: (empty($config['persistent']) ? '' : 'p:') . $config['host'], 87: $config['username'], 88: $config['password'] ?? '', 89: $config['database'] ?? '', 90: $config['port'] ?? 0, 91: $config['socket'], 92: $config['flags'] ?? 0, 93: ); 94: 95: if ($this->connection->connect_errno) { 96: throw new Dibi\DriverException($this->connection->connect_error, $this->connection->connect_errno); 97: } 98: } 99: 100: if (isset($config['charset'])) {
131: } else { 132: $class = preg_replace(['#\W#', '#sql#'], ['_', 'Sql'], ucfirst(strtolower($this->config['driver']))); 133: $class = "Dibi\\Drivers\\{$class}Driver"; 134: if (!class_exists($class)) { 135: throw new Exception("Unable to create instance of Dibi driver '$class'."); 136: } 137: } 138: 139: $event = $this->onEvent ? new Event($this, Event::CONNECT) : null; 140: try { 141: $this->driver = new $class($this->config); 142: $this->translator = new Translator($this); 143: 144: if ($event) { 145: $this->onEvent($event->done());