From 202857ba7dfa41d95c1f4b4c6452eeceaa4bc170 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roland=20H=C3=A4der?= Date: Thu, 23 Jun 2022 16:14:33 +0200 Subject: [PATCH] No need to log $tid here --- src/Database/Database.php | 2 +- src/Model/Tag.php | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Database/Database.php b/src/Database/Database.php index e5dec2d75e..2231ca0ccb 100644 --- a/src/Database/Database.php +++ b/src/Database/Database.php @@ -1761,7 +1761,6 @@ class Database * Checks if $array is a filled array with at least one entry. * * @param mixed $array A filled array with at least one entry - * * @return boolean Whether $array is a filled array or an object with rows */ public function isResult($array): bool @@ -1842,6 +1841,7 @@ class Database $upds = implode(', ', $upd); $r = $this->e(sprintf("UPDATE %s SET %s;", DBA::quoteIdentifier($table), $upds)); + if (!$this->isResult($r)) { throw new \RuntimeException("Failed updating `$table`: " . $this->errorMessage()); } diff --git a/src/Model/Tag.php b/src/Model/Tag.php index 538cedfb6b..1381f68611 100644 --- a/src/Model/Tag.php +++ b/src/Model/Tag.php @@ -243,9 +243,8 @@ class Tag return $tid; } - // Also log type and tag id + // Also log type $fields['type'] = $type; - $fields['tid'] = $tid; Logger::error('No tag id created', $fields); return 0;