Function updateExtrafield : replace empty value to null

This commit is contained in:
atm-lena 2021-10-14 17:13:44 +02:00
parent d75138b362
commit ff7727466a

View File

@ -5492,7 +5492,6 @@ abstract class CommonObject
}
$sql .= ")";
$resql = $this->db->query($sql);
if (!$resql)
{
@ -5792,7 +5791,7 @@ abstract class CommonObject
}
if ($linealreadyfound) {
if ($this->array_options["options_".$key] === null) {
if ($this->array_options["options_".$key] === '') {
$sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element."_extrafields SET ".$key." = null";
} else {
$sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element."_extrafields SET ".$key." = '".$this->db->escape($this->array_options["options_".$key])."'";