- Database->$driver can no longer be NULL, an empty string is fine anyway
This commit is contained in:
Roland Häder 2022-06-21 13:04:05 +02:00
parent 945cd1a2c2
commit 1080a840f5
No known key found for this signature in database
GPG Key ID: C82EDE5DDFA0BA77
2 changed files with 4 additions and 4 deletions

View File

@ -77,7 +77,7 @@ class DBA
*
* @return string with either "pdo" or "mysqli"
*/
public static function getDriver()
public static function getDriver(): string
{
return DI::dba()->getDriver();
}

View File

@ -64,7 +64,7 @@ class Database
protected $server_info = '';
/** @var PDO|mysqli */
protected $connection;
protected $driver;
protected $driver = '';
protected $pdo_emulate_prepares = false;
private $error = false;
private $errorno = 0;
@ -181,7 +181,7 @@ class Database
// No suitable SQL driver was found.
if (!$this->connected) {
$this->driver = null;
$this->driver = '';
$this->connection = null;
}
@ -233,7 +233,7 @@ class Database
}
}
$this->driver = null;
$this->driver = '';
$this->connected = false;
}