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:
@@ -99,13 +99,8 @@ class MySqliDriver implements Dibi\Driver, Dibi\ResultDriver
|
|||||||
|
|
||||||
$this->connection = mysqli_init();
|
$this->connection = mysqli_init();
|
||||||
if (isset($config['options'])) {
|
if (isset($config['options'])) {
|
||||||
if (is_scalar($config['options'])) {
|
foreach ($config['options'] as $key => $value) {
|
||||||
$config['flags'] = $config['options']; // back compatibility
|
mysqli_options($this->connection, $key, $value);
|
||||||
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) {
|
|
||||||
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 @
|
@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 @
|
||||||
|
Reference in New Issue
Block a user