From 348b6e358b0bf701a7c0e400e8c4773fe2659cd8 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 12 Oct 2025 17:26:40 +0200 Subject: Fix SQL bind bug when adding tag (#8101) Error in SQLite: `SQL error FreshRSS_TagDAO::addTag["HY000",25,"column index out of range"]` --- app/Models/TagDAO.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'app') diff --git a/app/Models/TagDAO.php b/app/Models/TagDAO.php index 4555018d0..e18cb7b2a 100644 --- a/app/Models/TagDAO.php +++ b/app/Models/TagDAO.php @@ -37,7 +37,9 @@ SQL; $valuesTmp['attributes'] = []; } if ($stm !== false) { - $stm->bindValue(':id', empty($valuesTmp['id']) ? null : $valuesTmp['id'], PDO::PARAM_INT); + if (!empty($valuesTmp['id'])) { + $stm->bindValue(':id', $valuesTmp['id'], PDO::PARAM_INT); + } $stm->bindValue(':name1', $valuesTmp['name'], PDO::PARAM_STR); $stm->bindValue(':name2', $valuesTmp['name'], PDO::PARAM_STR); $stm->bindValue(':attributes', is_string($valuesTmp['attributes']) ? $valuesTmp['attributes'] : -- cgit v1.2.3