From ccc8b19e071fc13a25fb7b5473f0a68aa89a71aa Mon Sep 17 00:00:00 2001 From: MDW Date: Fri, 8 Mar 2024 02:52:27 +0100 Subject: [PATCH] Fix: Ensure string type for urlencode() --- htdocs/product/reassort.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/product/reassort.php b/htdocs/product/reassort.php index a7ca019a763..32d15a43939 100644 --- a/htdocs/product/reassort.php +++ b/htdocs/product/reassort.php @@ -360,10 +360,10 @@ if ($resql) { $param .= "&tobuy=".urlencode($tobuy); } if ($type != '') { - $param .= "&type=".urlencode($type); + $param .= "&type=".urlencode((string) ($type)); } if ($fourn_id) { - $param .= "&fourn_id=".urlencode($fourn_id); + $param .= "&fourn_id=".urlencode((string) ($fourn_id)); } if ($snom) { $param .= "&snom=".urlencode($snom); @@ -375,13 +375,13 @@ if ($resql) { $param .= "&search_sale=".urlencode($search_sale); } if ($search_categ > 0) { - $param .= "&search_categ=".urlencode($search_categ); + $param .= "&search_categ=".urlencode((string) ($search_categ)); } if ($search_toolowstock) { $param .= "&search_toolowstock=".urlencode($search_toolowstock); } if ($sbarcode) { - $param .= "&sbarcode=".urlencode($sbarcode); + $param .= "&sbarcode=".urlencode((string) ($sbarcode)); } if ($search_stock_physique) { $param .= '&search_stock_physique=' . urlencode($search_stock_physique); @@ -519,7 +519,7 @@ if ($resql) { print_liste_field_titre("ProductStatusOnSell", $_SERVER["PHP_SELF"], "p.tosell", '', $param, "", $sortfield, $sortorder, 'right '); print_liste_field_titre("ProductStatusOnBuy", $_SERVER["PHP_SELF"], "p.tobuy", '', $param, "", $sortfield, $sortorder, 'right '); // Hook fields - $parameters = array('param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder); + $parameters = array('param' => $param, 'sortfield' => $sortfield, 'sortorder' => $sortorder); $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Action column @@ -617,7 +617,7 @@ if ($resql) { print ''.$product->LibStatut($objp->statut, 5, 0).''; print ''.$product->LibStatut($objp->tobuy, 5, 1).''; // Fields from hook - $parameters = array('obj'=>$objp); + $parameters = array('obj' => $objp); $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $product); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Action column