From e300acf109e09a227854653545a94eb66f9b3f2b Mon Sep 17 00:00:00 2001 From: Michael Kaufmann Date: Tue, 7 Feb 2023 11:23:21 +0100 Subject: [PATCH] corrected return type of pexecute_first Signed-off-by: Michael Kaufmann --- lib/Froxlor/Database/Database.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/Froxlor/Database/Database.php b/lib/Froxlor/Database/Database.php index 2e76b075..f4e69899 100644 --- a/lib/Froxlor/Database/Database.php +++ b/lib/Froxlor/Database/Database.php @@ -61,26 +61,26 @@ class Database /** * indicator whether to use root-connection or not */ - private static $needroot = false; + private static bool $needroot = false; /** * indicator which database-server we're on (not really used) */ - private static $dbserver = 0; + private static int $dbserver = 0; /** * used database-name */ - private static $dbname = null; + private static string $dbname = null; /** * sql-access data */ - private static $needsqldata = false; + private static bool $needsqldata = false; private static $sqldata = null; - private static $need_dbname = true; + private static bool $need_dbname = true; /** * Wrapper for PDOStatement::execute, so we can catch the PDOException @@ -94,10 +94,10 @@ class Database * suppress error display (default true) * @param bool $json_response * - * @return array + * @return mixed * @throws Exception */ - public static function pexecute_first(PDOStatement &$stmt, $params = null, bool $showerror = true, bool $json_response = false): array + public static function pexecute_first(PDOStatement &$stmt, $params = null, bool $showerror = true, bool $json_response = false) { self::pexecute($stmt, $params, $showerror, $json_response); return $stmt->fetch(PDO::FETCH_ASSOC);