Skip to content

Commit

Permalink
fix: corrected return value, closes #3037
Browse files Browse the repository at this point in the history
  • Loading branch information
thorsten committed Jun 30, 2024
1 parent 5ef4346 commit 9b18ff3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions phpmyfaq/src/phpMyFAQ/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -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')",
Expand All @@ -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);
}

/**
Expand All @@ -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);
}

/**
Expand Down

0 comments on commit 9b18ff3

Please sign in to comment.