From 7295138f8d9499d64c9ea8a0b408f8b8218e7f33 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Wed, 22 Jun 2022 07:47:15 -0400 Subject: [PATCH] Remove type-hint inconsistent with expected return value in Database->getVariable --- src/Database/Database.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Database/Database.php b/src/Database/Database.php index 1c9e24adef..e5dec2d75e 100644 --- a/src/Database/Database.php +++ b/src/Database/Database.php @@ -1748,9 +1748,10 @@ class Database * Fetch a database variable * * @param string $name - * @return string content + * @return string|null content or null if inexistent + * @throws \Exception */ - public function getVariable(string $name): string + public function getVariable(string $name) { $result = $this->fetchFirst("SHOW GLOBAL VARIABLES WHERE `Variable_name` = ?", $name); return $result['Value'] ?? null; -- 2.39.5