From 86c1bb8fe57ce45fbf19e169bff9d2fa2aaae3c7 Mon Sep 17 00:00:00 2001 From: MDW Date: Fri, 8 Mar 2024 02:50:04 +0100 Subject: [PATCH] Fix: Ensure string type for urlencode() --- htdocs/compta/prelevement/line.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/compta/prelevement/line.php b/htdocs/compta/prelevement/line.php index 85e92020011..96d9a2d6b2c 100644 --- a/htdocs/compta/prelevement/line.php +++ b/htdocs/compta/prelevement/line.php @@ -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");