From 9b18ff37bde29948102f998b019d30dc209a52f7 Mon Sep 17 00:00:00 2001 From: Thorsten Rinne Date: Sun, 30 Jun 2024 11:54:29 +0200 Subject: [PATCH] fix: corrected return value, closes #3037 --- phpmyfaq/src/phpMyFAQ/Configuration.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/phpmyfaq/src/phpMyFAQ/Configuration.php b/phpmyfaq/src/phpMyFAQ/Configuration.php index f0dc6b7652..e2590f09b9 100644 --- a/phpmyfaq/src/phpMyFAQ/Configuration.php +++ b/phpmyfaq/src/phpMyFAQ/Configuration.php @@ -357,7 +357,7 @@ public function getElasticsearchConfig(): ElasticsearchConfiguration /** * Adds a configuration item for the database. */ - public function add(string $name, mixed $value): object|bool + public function add(string $name, mixed $value): bool { $insert = sprintf( "INSERT INTO %s%s VALUES ('%s', '%s')", @@ -367,7 +367,7 @@ public function add(string $name, mixed $value): object|bool $this->getDb()->escape(trim((string) $value)) ); - return $this->getDb()->query($insert); + return (bool) $this->getDb()->query($insert); } /** @@ -382,7 +382,7 @@ public function delete(string $name): bool $this->getDb()->escape(trim($name)) ); - return (bool)$this->getDb()->query($delete); + return (bool) $this->getDb()->query($delete); } /**