From b5bebdf657e58c2ff0895a64a756f1fcc4d8fa38 Mon Sep 17 00:00:00 2001 From: MDW Date: Fri, 8 Mar 2024 02:52:40 +0100 Subject: [PATCH] Fix: Ensure string type for urlencode() --- htdocs/product/stats/contrat.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/product/stats/contrat.php b/htdocs/product/stats/contrat.php index 870e7f81fda..6712ac33185 100644 --- a/htdocs/product/stats/contrat.php +++ b/htdocs/product/stats/contrat.php @@ -179,7 +179,7 @@ if ($id > 0 || !empty($ref)) { $option .= '&search_month='.urlencode($search_month); } if (!empty($search_year)) { - $option .= '&search_year='.urlencode($search_year); + $option .= '&search_year='.urlencode((string) ($search_year)); } print '
'."\n"; @@ -195,7 +195,7 @@ if ($id > 0 || !empty($ref)) { print_barre_liste($langs->trans("Contrats"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit, 0, 0, 1); if (!empty($page)) { - $option .= '&page='.urlencode($page); + $option .= '&page='.urlencode((string) ($page)); } $i = 0;