Merge pull request #19067 from atm-lena/14.0_FIX_19008_LineBoolean

FIX #19008
This commit is contained in:
Laurent Destailleur 2021-10-21 22:09:56 +02:00 committed by GitHub
commit 313e0f86dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2220,11 +2220,18 @@ class ExtraFields
continue; // Value was not provided, we should not set it. 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' if ($keysuffix != 'search_') { // If value is for a search, we must keep complex string like '>100 <=150'
$value_key = price2num($value_arr); $value_key = price2num($value_arr);
} else { } else {
$value_key = $value_arr; $value_key = $value_arr;
} }
} elseif (in_array($key_type, array('boolean'))) {
if (!GETPOSTISSET($keysuffix."options_".$key.$keyprefix)) {
$value_key = '';
} else {
$value_arr = GETPOST($keysuffix."options_".$key.$keyprefix);
$value_key = $value_arr;
}
} else { } else {
if (!GETPOSTISSET($keysuffix."options_".$key.$keyprefix)) { if (!GETPOSTISSET($keysuffix."options_".$key.$keyprefix)) {
continue; // Value was not provided, we should not set it. continue; // Value was not provided, we should not set it.