Fix: Ensure string type for urlencode()

This commit is contained in:
MDW 2024-03-08 02:50:04 +01:00
parent e2f6d646d3
commit 86c1bb8fe5
No known key found for this signature in database

View file

@ -111,7 +111,7 @@ if ($action == 'confirm_rejet' && $permissiontoadd) {
$result = $rej->create($user, $id, GETPOSTINT('motif'), $daterej, $lipre->bon_rowid, GETPOSTINT('facturer'));
if ($result > 0) {
header("Location: line.php?id=".urlencode($id).'&type='.urlencode($type));
header("Location: line.php?id=".urlencode((string) ($id)).'&type='.urlencode((string) ($type)));
exit;
}
}
@ -119,7 +119,7 @@ if ($action == 'confirm_rejet' && $permissiontoadd) {
$action = "rejet";
}
} else {
header("Location: line.php?id=".urlencode($id).'&type='.urlencode($type));
header("Location: line.php?id=".urlencode((string) ($id)).'&type='.urlencode((string) ($type)));
exit;
}
}
@ -343,7 +343,7 @@ if ($id) {
$num = $db->num_rows($result);
$i = 0;
$urladd = "&id=".urlencode($id);
$urladd = "&id=".urlencode((string) ($id));
$title = $langs->trans("Bills");
if ($type == 'bank-transfer') {
$title = $langs->trans("SupplierInvoices");