From 1b7eb4dc6cfce382c7a3192bdc8bf6fd52791de1 Mon Sep 17 00:00:00 2001 From: Bart Visscher Date: Sat, 11 Jan 2014 12:22:23 +0100 Subject: [PATCH] Quote column names on insert --- core/command/db/convertfromsqlite.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/command/db/convertfromsqlite.php b/core/command/db/convertfromsqlite.php index ed0443e980..5ae54b6893 100644 --- a/core/command/db/convertfromsqlite.php +++ b/core/command/db/convertfromsqlite.php @@ -194,7 +194,11 @@ class ConvertFromSqlite extends Command { $progress->setRedrawFrequency($count > 100 ? 5 : 1); while($row = $statement->fetch()) { $progress->advance(); - $toDB->insert($table, $row); + $data = array(); + foreach ($row as $columnName => $value) { + $data[$toDB->quoteIdentifier($columnName)] = $value; + } + $toDB->insert($table, $data); } $progress->finish(); }