Function updateExtrafield : replace empty value to null
This commit is contained in:
parent
d75138b362
commit
ff7727466a
@ -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])."'";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user