Update actions_addupdatedelete.inc.php

This commit is contained in:
Laurent Destailleur 2020-08-04 12:19:44 +02:00
parent 13202dfc7c
commit 2aaae47aef

View File

@ -165,7 +165,7 @@ if ($action == 'update' && !empty($permissiontoadd))
} elseif (preg_match('/^(integer|price|real|double)/', $object->fields[$key]['type'])) {
$value = price2num(GETPOST($key, 'none')); // To fix decimal separator according to lang setup
} elseif ($object->fields[$key]['type'] == 'boolean') {
$value = (GETPOST($key) == '1' ? 1 : 0);
$value = ((GETPOST($key, 'aZ09) == 'on' || GETPOST($key, 'aZ09') == '1') ? 1 : 0);
} else {
$value = GETPOST($key, 'alpha');
}