Remove warnings

This commit is contained in:
Laurent Destailleur 2015-04-06 19:46:10 +02:00
parent c148f82452
commit 493392d89f
2 changed files with 6 additions and 7 deletions

View File

@ -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

View File

@ -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.='<div class="inline-block tabsElem'.($isactive ? ' tabsElemActive' : '').((! $isactive && ! empty($conf->global->MAIN_HIDE_INACTIVETAB_ON_PRINT))?' hideonprint':'').'">';
$out.='<div class="inline-block tabsElem'.($isactive ? ' tabsElemActive' : '').((! $isactive && ! empty($conf->global->MAIN_HIDE_INACTIVETAB_ON_PRINT))?' hideonprint':'').'"><!-- id tab = '.(empty($links[$i][2])?'':$links[$i][2]).' -->';
if (isset($links[$i][2]) && $links[$i][2] == 'image')
{
if (!empty($links[$i][0]))