diff --git a/htdocs/resource/list.php b/htdocs/resource/list.php index 85be267613d..68f91327f6d 100644 --- a/htdocs/resource/list.php +++ b/htdocs/resource/list.php @@ -1,6 +1,7 @@ * Copyright (C) 2018 Nicolas ZABOURI + * Copyright (C) 2018 Frédéric France * * 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 @@ -51,6 +52,9 @@ $extrafields = new ExtraFields($db); // fetch optionals attributes and labels $extralabels=$extrafields->fetch_name_optionals_label($object->table_element); $search_array_options=$extrafields->getOptionalsFromPost($extralabels,'','search_'); +if (! is_array($search_array_options)) { + $search_array_options = array(); +} $search_ref=GETPOST("search_ref"); $search_type=GETPOST("search_type"); @@ -196,7 +200,7 @@ if($ret == -1) { $newcardbutton=''; if ($user->rights->resource->write) { - $newcardbutton=''.$langs->trans('MenuResourceAdd').''; + $newcardbutton=''.$langs->trans('MenuResourceAdd').''; $newcardbutton.= ''; $newcardbutton.= ''; }