]> git.mxchange.org Git - friendica.git/commitdiff
Remove type-hint inconsistent with expected return value in Database->getVariable
authorHypolite Petovan <hypolite@mrpetovan.com>
Wed, 22 Jun 2022 11:47:15 +0000 (07:47 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Wed, 22 Jun 2022 11:47:15 +0000 (07:47 -0400)
src/Database/Database.php

index 1c9e24adef10a748edc4c8f5ea5dd0be5c4d21bb..e5dec2d75e6b074b9da6802e9c9509b64ae2db8d 100644 (file)
@@ -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;