From 484f6f275fbfc9f70d8d8fbee3fb73dac6f9d1a5 Mon Sep 17 00:00:00 2001 From: lmarcouiller Date: Fri, 30 Apr 2021 10:56:47 +0200 Subject: [PATCH 1/2] Fix #17424 : preg_match error on List of purchase orders --- htdocs/fourn/commande/list.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/fourn/commande/list.php b/htdocs/fourn/commande/list.php index 1515429199a..3193fd3a8ad 100644 --- a/htdocs/fourn/commande/list.php +++ b/htdocs/fourn/commande/list.php @@ -91,8 +91,8 @@ $search_project_ref = GETPOST('search_project_ref', 'alpha'); $search_btn = GETPOST('button_search', 'alpha'); $search_remove_btn = GETPOST('button_removefilter', 'alpha'); -if (is_array(GETPOST('search_status', 'intcomma'))) { - $search_status = join(',', GETPOST('search_status', 'intcomma')); +if (is_array(GETPOST('search_status', 'array:intcomma'))) { + $search_status = join(',', GETPOST('search_status', 'array:intcomma')); } else { $search_status = (GETPOST('search_status', 'intcomma') != '' ? GETPOST('search_status', 'intcomma') : GETPOST('statut', 'intcomma')); } From edd178c373efeb0bf58b7501b9e0dc8b7c767b9a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 30 Apr 2021 12:09:42 +0200 Subject: [PATCH 2/2] Update list.php --- htdocs/fourn/commande/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/commande/list.php b/htdocs/fourn/commande/list.php index 3193fd3a8ad..d32e466444c 100644 --- a/htdocs/fourn/commande/list.php +++ b/htdocs/fourn/commande/list.php @@ -91,7 +91,7 @@ $search_project_ref = GETPOST('search_project_ref', 'alpha'); $search_btn = GETPOST('button_search', 'alpha'); $search_remove_btn = GETPOST('button_removefilter', 'alpha'); -if (is_array(GETPOST('search_status', 'array:intcomma'))) { +if (is_array(GETPOST('search_status', 'none'))) { // 'none' because we want to know type before sanitizing $search_status = join(',', GETPOST('search_status', 'array:intcomma')); } else { $search_status = (GETPOST('search_status', 'intcomma') != '' ? GETPOST('search_status', 'intcomma') : GETPOST('statut', 'intcomma'));