From e8cac0df3579ee30e895c420f48ee6159f33867f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Wed, 21 Nov 2018 14:06:06 +0100 Subject: [PATCH] correct link and avoid warning in resource list --- htdocs/resource/list.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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.= ''; }