fix single_insert when a field is null (#477)

fix #449

Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
This commit is contained in:
Marc Poulhiès
2016-11-17 14:20:50 +01:00
committed by Pierrick Le Gall
parent dde2426bbf
commit 9b9ec600ea
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -503,7 +503,7 @@ INSERT INTO '.$table_name.'
$is_first = false;
}
if ($value === '')
if ($value === '' || is_null($value))
{
$query .= 'NULL';
}
+1 -1
View File
@@ -594,7 +594,7 @@ INSERT INTO '.$table_name.'
$is_first = false;
}
if ($value === '')
if ($value === '' || is_null($value))
{
$query .= 'NULL';
}