Update commonobject.class.php

This commit is contained in:
Laurent Destailleur 2020-07-29 14:13:29 +02:00 committed by GitHub
parent 255bd6b26c
commit 3d79950c27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7549,11 +7549,11 @@ abstract class CommonObject
if (array_key_exists('ref', $fieldvalues)) $fieldvalues['ref'] = dol_string_nospecial($fieldvalues['ref']); // If field is a ref, we sanitize data
$keys = array();
$values = array();
$values = array(); // Array to store string forged for SQL syntax
foreach ($fieldvalues as $k => $v) {
$keys[$k] = $k;
$value = $this->fields[$k];
$values[$k] = $this->quote($v, $value);
$values[$k] = $this->quote($v, $value); // May return string 'NULL' if $value is null
}
// Clean and check mandatory