Fix SQL bind bug when adding tag (#8101)

Error in SQLite: `SQL error FreshRSS_TagDAO::addTag["HY000",25,"column index out of range"]`
This commit is contained in:
Alexandre Alapetite
2025-10-12 17:26:40 +02:00
committed by GitHub
parent 458832cbb3
commit 348b6e358b

View File

@@ -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'] :