aboutsummaryrefslogtreecommitdiff
path: root/app/Models
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2025-10-12 17:26:40 +0200
committerGravatar GitHub <noreply@github.com> 2025-10-12 17:26:40 +0200
commit348b6e358b0bf701a7c0e400e8c4773fe2659cd8 (patch)
tree5c71f7aa109f37887d12823f3bbd4f3545533e40 /app/Models
parent458832cbb3eb789cec2f64f51ebba0a6f0e520b1 (diff)
Fix SQL bind bug when adding tag (#8101)
Error in SQLite: `SQL error FreshRSS_TagDAO::addTag["HY000",25,"column index out of range"]`
Diffstat (limited to 'app/Models')
-rw-r--r--app/Models/TagDAO.php4
1 files changed, 3 insertions, 1 deletions
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'] :