2
0
forked from Wavyzz/dolibarr

Prepare fix #yogosha6443

This commit is contained in:
Laurent Destailleur
2021-06-30 17:14:19 +02:00
parent 7c2121c439
commit bda36337cd
14 changed files with 78 additions and 238 deletions

View File

@@ -8167,15 +8167,6 @@ abstract class CommonObject
} else {
$queryarray[$field] = $this->db->idate($this->{$field});
}
} elseif ($this->isArray($info)) {
if (!empty($this->{$field})) {
if (!is_array($this->{$field})) {
$this->{$field} = array($this->{$field});
}
$queryarray[$field] = serialize($this->{$field});
} else {
$queryarray[$field] = null;
}
} elseif ($this->isDuration($info)) {
// $this->{$field} may be null, '', 0, '0', 123, '123'
if ((isset($this->{$field}) && $this->{$field} != '') || !empty($info['notnull'])) {
@@ -8236,16 +8227,6 @@ abstract class CommonObject
} else {
$this->{$field} = $db->jdate($obj->{$field});
}
} elseif ($this->isArray($info)) {
if (!empty($obj->{$field})) {
$this->{$field} = @unserialize($obj->{$field});
// Hack for data not in UTF8
if ($this->{$field } === false) {
@unserialize(utf8_decode($obj->{$field}));
}
} else {
$this->{$field} = array();
}
} elseif ($this->isInt($info)) {
if ($field == 'rowid') {
$this->id = (int) $obj->{$field};