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 plegall
parent 9a93d1f44b
commit e35a560759
2 changed files with 2 additions and 2 deletions

View File

@@ -503,7 +503,7 @@ INSERT INTO '.$table_name.'
$is_first = false;
}
if ($value === '')
if ($value === '' || is_null($value))
{
$query .= 'NULL';
}

View File

@@ -594,7 +594,7 @@ INSERT INTO '.$table_name.'
$is_first = false;
}
if ($value === '')
if ($value === '' || is_null($value))
{
$query .= 'NULL';
}