From 36ae6b087c2e370e887a32a70ff5250fc6c17586 Mon Sep 17 00:00:00 2001 From: Ibrahim Date: Thu, 24 Aug 2023 16:17:05 +0200 Subject: [PATCH] Check the column value in batch insert for SQLite prior to 3.7.11 version --- framework/db/sqlite/QueryBuilder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/db/sqlite/QueryBuilder.php b/framework/db/sqlite/QueryBuilder.php index 18abffa8ebd..cc8b1ef995d 100644 --- a/framework/db/sqlite/QueryBuilder.php +++ b/framework/db/sqlite/QueryBuilder.php @@ -157,7 +157,7 @@ public function batchInsert($table, $columns, $rows, &$params = []) foreach ($rows as $row) { $vs = []; foreach ($row as $i => $value) { - if (isset($columnSchemas[$columns[$i]])) { + if (isset($columns[$i], $columnSchemas[$columns[$i]])) { $value = $columnSchemas[$columns[$i]]->dbTypecast($value); } if (is_string($value)) {