diff --git a/htdocs/ticket/list.php b/htdocs/ticket/list.php index 7d2160978de..cc69d923909 100644 --- a/htdocs/ticket/list.php +++ b/htdocs/ticket/list.php @@ -4,6 +4,7 @@ * Copyright (C) 2018 Regis Houssin * Copyright (C) 2019-2021 Juanjo Menent * Copyright (C) 2019-2020 Laurent Destailleur + * Copyright (C) 2023 Charlene Benke * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -112,7 +113,8 @@ $search = array(); foreach ($object->fields as $key => $val) { if (GETPOST('search_'.$key, 'alpha') !== '') { $search[$key] = GETPOST('search_'.$key, 'alpha'); - } + } else + $search[$key] = ""; if (preg_match('/^(date|timestamp|datetime)/', $val['type'])) { $search[$key.'_dtstart'] = dol_mktime(0, 0, 0, GETPOST('search_'.$key.'_dtstartmonth', 'int'), GETPOST('search_'.$key.'_dtstartday', 'int'), GETPOST('search_'.$key.'_dtstartyear', 'int')); $search[$key.'_dtend'] = dol_mktime(23, 59, 59, GETPOST('search_'.$key.'_dtendmonth', 'int'), GETPOST('search_'.$key.'_dtendday', 'int'), GETPOST('search_'.$key.'_dtendyear', 'int'));