diff options
| author | 2025-10-12 17:26:40 +0200 | |
|---|---|---|
| committer | 2025-10-12 17:26:40 +0200 | |
| commit | 348b6e358b0bf701a7c0e400e8c4773fe2659cd8 (patch) | |
| tree | 5c71f7aa109f37887d12823f3bbd4f3545533e40 /app | |
| parent | 458832cbb3eb789cec2f64f51ebba0a6f0e520b1 (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')
| -rw-r--r-- | app/Models/TagDAO.php | 4 |
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'] : |
