mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-05-02 03:22:50 +02:00
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:
@@ -503,7 +503,7 @@ INSERT INTO '.$table_name.'
|
||||
$is_first = false;
|
||||
}
|
||||
|
||||
if ($value === '')
|
||||
if ($value === '' || is_null($value))
|
||||
{
|
||||
$query .= 'NULL';
|
||||
}
|
||||
|
||||
@@ -594,7 +594,7 @@ INSERT INTO '.$table_name.'
|
||||
$is_first = false;
|
||||
}
|
||||
|
||||
if ($value === '')
|
||||
if ($value === '' || is_null($value))
|
||||
{
|
||||
$query .= 'NULL';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user