Changes:
- Database->$driver can no longer be NULL, an empty string is fine anywaypull/11665/head
parent
945cd1a2c2
commit
1080a840f5
|
@ -77,7 +77,7 @@ class DBA
|
||||||
*
|
*
|
||||||
* @return string with either "pdo" or "mysqli"
|
* @return string with either "pdo" or "mysqli"
|
||||||
*/
|
*/
|
||||||
public static function getDriver()
|
public static function getDriver(): string
|
||||||
{
|
{
|
||||||
return DI::dba()->getDriver();
|
return DI::dba()->getDriver();
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,7 +64,7 @@ class Database
|
||||||
protected $server_info = '';
|
protected $server_info = '';
|
||||||
/** @var PDO|mysqli */
|
/** @var PDO|mysqli */
|
||||||
protected $connection;
|
protected $connection;
|
||||||
protected $driver;
|
protected $driver = '';
|
||||||
protected $pdo_emulate_prepares = false;
|
protected $pdo_emulate_prepares = false;
|
||||||
private $error = false;
|
private $error = false;
|
||||||
private $errorno = 0;
|
private $errorno = 0;
|
||||||
|
@ -181,7 +181,7 @@ class Database
|
||||||
|
|
||||||
// No suitable SQL driver was found.
|
// No suitable SQL driver was found.
|
||||||
if (!$this->connected) {
|
if (!$this->connected) {
|
||||||
$this->driver = null;
|
$this->driver = '';
|
||||||
$this->connection = null;
|
$this->connection = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -233,7 +233,7 @@ class Database
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->driver = null;
|
$this->driver = '';
|
||||||
$this->connected = false;
|
$this->connected = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue