This commit is contained in:
atm-lena 2021-10-21 18:54:07 +02:00
parent 03765528e1
commit bdc8854baa
2 changed files with 2 additions and 8 deletions

View File

@ -5971,12 +5971,6 @@ abstract class CommonObject
dol_syslog('Error bad setup of extrafield', LOG_WARNING);
}
break;
case 'boolean':
if (empty($this->array_options["options_".$key])) {
$this->array_options["options_".$key] = null;
}
break;
}
}

View File

@ -2216,10 +2216,10 @@ class ExtraFields
$value_arr = (array) $value_arr;
$value_key = implode(',', $value_arr);
} elseif (in_array($key_type, array('price', 'double', 'int'))) {
if (!GETPOSTISSET($keysuffix . "options_" . $key . $keyprefix)) {
if (!GETPOSTISSET($keysuffix."options_".$key.$keyprefix)) {
continue; // Value was not provided, we should not set it.
}
$value_arr = GETPOST($keysuffix . "options_" . $key . $keyprefix);
$value_arr = GETPOST($keysuffix."options_".$key.$keyprefix);
if ($keysuffix != 'search_') { // If value is for a search, we must keep complex string like '>100 <=150'
$value_key = price2num($value_arr);
} else {