]> git.mxchange.org Git - friendica.git/blobdiff - src/Database/Database.php
Changes:
[friendica.git] / src / Database / Database.php
index e0471b363551699315b17cb039fe9a3de6978f51..384e1d1a658dee0731c979fe0e254d1b4541dedd 100644 (file)
@@ -1527,6 +1527,7 @@ class Database
         */
        public function count($table, array $condition = [], array $params = []): int
        {
+               // @TODO Can we dump this to have ": int" as returned type-hint?
                if (empty($table)) {
                        throw new InvalidArgumentException('Parameter "table" cannot be empty.');
                }
@@ -1843,7 +1844,7 @@ class Database
 
                $upds = implode(', ', $upd);
 
-               $r = $this->e(sprintf("UPDATE %s SET %s;", $table_name, $upds));
+               $r = $this->e(sprintf("UPDATE %s SET %s;", DBA::quoteIdentifier($table_name), $upds));
                if (!$this->isResult($r)) {
                        throw new \RuntimeException("Failed updating `$table_name`: " . $this->errorMessage());
                }