From: Hypolite Petovan Date: Wed, 22 Jun 2022 11:47:15 +0000 (-0400) Subject: Remove type-hint inconsistent with expected return value in Database->getVariable X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=7295138f8d9499d64c9ea8a0b408f8b8218e7f33;p=friendica.git Remove type-hint inconsistent with expected return value in Database->getVariable --- 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;