bugfix: don't fail when inserting multiple rows at once, and one of the values is NULL
This commit is contained in:
@@ -355,7 +355,7 @@ class MeekroDB {
|
||||
$insert_values = array();
|
||||
|
||||
foreach ($keys as $key) {
|
||||
if ($many && !isset($data[$key])) $this->nonSQLError('insert/replace many: each assoc array must have the same keys!');
|
||||
if ($many && !array_key_exists($key, $data)) $this->nonSQLError('insert/replace many: each assoc array must have the same keys!');
|
||||
$datum = $data[$key];
|
||||
$datum = $this->sanitize($datum);
|
||||
$insert_values[] = $datum;
|
||||
|
||||
Reference in New Issue
Block a user