From 730593b525c491fd6f1c889a5e7a4c1d95c61e38 Mon Sep 17 00:00:00 2001 From: BENKE Charles Date: Sun, 22 Mar 2015 20:26:20 +0100 Subject: [PATCH] Update extrafields.class.php if no elementtype send at the function, they return an empty array --- htdocs/core/class/extrafields.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index c821f6a1f34..94772eac79a 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -567,10 +567,12 @@ class ExtraFields { global $conf; + if ( empty($elementtype) ) return array(); + if ($elementtype == 'thirdparty') $elementtype='societe'; $array_name_label=array(); - + // For avoid conflicts with external modules if (!$forceload && !empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) return $array_name_label;