From f77b45656d8f8e2b367fb421f722c1f1f69a35c3 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Tue, 15 Oct 2024 17:14:50 +0200 Subject: Fix add feed with MariaDB / MySQL (#6900) * Fix add feed with MariaDB / MySQL fix https://github.com/FreshRSS/FreshRSS/issues/6897 Regression from https://github.com/FreshRSS/FreshRSS/pull/4487 * Type fix --- app/Models/FeedDAO.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app/Models/FeedDAO.php') diff --git a/app/Models/FeedDAO.php b/app/Models/FeedDAO.php index e6bd34185..ea6e7fc55 100644 --- a/app/Models/FeedDAO.php +++ b/app/Models/FeedDAO.php @@ -140,7 +140,7 @@ class FreshRSS_FeedDAO extends Minz_ModelPdo { * @param array{'url'?:string,'kind'?:int,'category'?:int,'name'?:string,'website'?:string,'description'?:string,'lastUpdate'?:int,'priority'?:int, * 'pathEntries'?:string,'httpAuth'?:string,'error'?:int,'ttl'?:int,'attributes'?:string|array} $valuesTmp $valuesTmp */ - public function updateFeed(int $id, array $valuesTmp): int|false { + public function updateFeed(int $id, array $valuesTmp): bool { $values = []; $originalValues = $valuesTmp; if (isset($valuesTmp['name'])) { @@ -174,7 +174,7 @@ class FreshRSS_FeedDAO extends Minz_ModelPdo { $values[] = $id; if ($stm !== false && $stm->execute($values)) { - return $stm->rowCount(); + return true; } else { $info = $stm === false ? $this->pdo->errorInfo() : $stm->errorInfo(); if ($this->autoUpdateDb($info)) { @@ -189,7 +189,7 @@ class FreshRSS_FeedDAO extends Minz_ModelPdo { * @param non-empty-string $key * @param string|array|bool|int|null $value */ - public function updateFeedAttribute(FreshRSS_Feed $feed, string $key, $value): int|false { + public function updateFeedAttribute(FreshRSS_Feed $feed, string $key, $value): bool { $feed->_attribute($key, $value); return $this->updateFeed( $feed->id(), -- cgit v1.2.3