Fix GETPOSTINT(trackingurl), is_numeric(GETPOSTINT()), unneeded trim

This commit is contained in:
MDW 2024-03-17 14:57:16 +01:00
parent 6843232393
commit 1fe9527e80
No known key found for this signature in database

View File

@ -546,24 +546,24 @@ if (empty($reshook)) {
$object->tracking_number = trim(GETPOST('tracking_number', 'alpha'));
}
if ($action == 'settracking_url') {
$object->tracking_url = trim(GETPOSTINT('tracking_url'));
$object->tracking_url = trim(GETPOST('tracking_url', 'restricthtml'));
}
if ($action == 'settrueWeight') {
$object->trueWeight = trim(GETPOSTINT('trueWeight'));
$object->trueWeight = GETPOSTINT('trueWeight');
$object->weight_units = GETPOSTINT('weight_units');
}
if ($action == 'settrueWidth') {
$object->trueWidth = trim(GETPOSTINT('trueWidth'));
$object->trueWidth = GETPOSTINT('trueWidth');
}
if ($action == 'settrueHeight') {
$object->trueHeight = trim(GETPOSTINT('trueHeight'));
$object->trueHeight = GETPOSTINT('trueHeight');
$object->size_units = GETPOSTINT('size_units');
}
if ($action == 'settrueDepth') {
$object->trueDepth = trim(GETPOSTINT('trueDepth'));
$object->trueDepth = GETPOSTINT('trueDepth');
}
if ($action == 'setshipping_method_id') {
$object->shipping_method_id = trim(GETPOSTINT('shipping_method_id'));
$object->shipping_method_id = GETPOSTINT('shipping_method_id');
}
if (!$error) {
@ -1336,7 +1336,7 @@ if ($action == 'create') {
// Show warehouse combo list
$ent = "entl".$indiceAsked;
$idl = "idl".$indiceAsked;
$tmpentrepot_id = is_numeric(GETPOSTINT($ent)) ? GETPOSTINT($ent) : $warehouse_id;
$tmpentrepot_id = is_numeric(GETPOST($ent)) ? GETPOSTINT($ent) : $warehouse_id;
if ($line->fk_product > 0) {
print '<!-- Show warehouse selection -->';