From: Roland Häder Date: Tue, 21 Jun 2022 11:04:05 +0000 (+0200) Subject: Changes: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=1080a840f5b9178182976f157b9883af4bc86617;p=friendica.git Changes: - Database->$driver can no longer be NULL, an empty string is fine anyway --- diff --git a/src/Database/DBA.php b/src/Database/DBA.php index 68fb32f9a2..d428f36f5a 100644 --- a/src/Database/DBA.php +++ b/src/Database/DBA.php @@ -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(); } diff --git a/src/Database/Database.php b/src/Database/Database.php index fbdde000c1..a77494d69a 100644 --- a/src/Database/Database.php +++ b/src/Database/Database.php @@ -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; }