aboutsummaryrefslogtreecommitdiff
path: root/app/Models
diff options
context:
space:
mode:
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'] :