From 1080a840f5b9178182976f157b9883af4bc86617 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 21 Jun 2022 13:04:05 +0200 Subject: [PATCH] Changes: - Database->$driver can no longer be NULL, an empty string is fine anyway --- src/Database/DBA.php | 2 +- src/Database/Database.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) 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; } -- 2.39.5