]> git.mxchange.org Git - friendica.git/commitdiff
Add missing identifier quote in Database->replaceInTableFields
authorHypolite Petovan <hypolite@mrpetovan.com>
Mon, 20 Jun 2022 00:06:12 +0000 (20:06 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Mon, 20 Jun 2022 00:06:12 +0000 (20:06 -0400)
- This caused hyphenated table names to fail the replace query

src/Database/Database.php

index 7edbdf2a2c695dbecc9f7b87ab6ddf0e6f70940d..d1aff8221888e39c6f6880baf00b733561532323 100644 (file)
@@ -1820,7 +1820,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());
                }