1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-05 05:37:39 +02:00

MySqliDriver: removed deprecated stuff

This commit is contained in:
David Grudl
2017-09-07 20:45:46 +02:00
parent 125db626e5
commit b35b75d9c7

View File

@@ -99,15 +99,10 @@ class MySqliDriver implements Dibi\Driver, Dibi\ResultDriver
$this->connection = mysqli_init();
if (isset($config['options'])) {
if (is_scalar($config['options'])) {
$config['flags'] = $config['options']; // back compatibility
trigger_error(__CLASS__ . ": configuration item 'options' must be array; for constants MYSQLI_CLIENT_* use 'flags'.", E_USER_NOTICE);
} else {
foreach ((array) $config['options'] as $key => $value) {
foreach ($config['options'] as $key => $value) {
mysqli_options($this->connection, $key, $value);
}
}
}
@mysqli_real_connect($this->connection, (empty($config['persistent']) ? '' : 'p:') . $config['host'], $config['username'], $config['password'], $config['database'] ?? '', $config['port'] ?? 0, $config['socket'], $config['flags'] ?? 0); // intentionally @
if ($errno = mysqli_connect_errno()) {