diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 16e6af25cc7..a9a44fc27d1 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -568,11 +568,11 @@ 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; @@ -602,7 +602,7 @@ class ExtraFields $this->attribute_elementtype[$tab->name]=$tab->elementtype; $this->attribute_unique[$tab->name]=$tab->fieldunique; $this->attribute_required[$tab->name]=$tab->fieldrequired; - $this->attribute_param[$tab->name]=unserialize($tab->param); + $this->attribute_param[$tab->name]=($tab->param ? unserialize($tab->param) : ''); $this->attribute_pos[$tab->name]=$tab->pos; $this->attribute_alwayseditable[$tab->name]=$tab->alwayseditable; $this->attribute_perms[$tab->name]=$tab->perms; @@ -1056,7 +1056,7 @@ class ExtraFields elseif ($type == 'link') { $out=''; - + $param_list=array_keys($param['options']); // 0 : ObjectName // 1 : classPath diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 5efbc507db9..a32f52abc1b 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -729,8 +729,7 @@ function dol_get_fiche_head($links=array(), $active='0', $title='', $notab=0, $p for ($i = 0 ; $i <= $maxkey ; $i++) { - - if ((is_numeric($active) && $i == $active) || (! is_numeric($active) && $active == $links[$i][2])) + if ((is_numeric($active) && $i == $active) || (! empty($links[$i][2]) && ! is_numeric($active) && $active == $links[$i][2])) { $isactive=true; $bactive=true; @@ -742,7 +741,7 @@ function dol_get_fiche_head($links=array(), $active='0', $title='', $notab=0, $p if ($i <=$limittoshow || $isactive ) { - $out.='
'; + $out.='
'; if (isset($links[$i][2]) && $links[$i][2] == 'image') { if (!empty($links[$i][0]))