Fix regression adding a false error message

This commit is contained in:
Laurent Destailleur 2017-09-02 12:17:29 +02:00
parent bc446999dd
commit 015bc51c43

View File

@ -769,8 +769,8 @@ class ExtraFields
$this->attributes[$tab->elementtype]['ishidden'][$tab->name]=$tab->ishidden;
$this->attributes[$tab->elementtype]['entityid'][$tab->name]=$tab->entity;
if (!empty($conf->multicompany->enabled)) {
if (!empty($conf->multicompany->enabled))
{
$sql_entity_name='SELECT label FROM '.MAIN_DB_PREFIX.'entity WHERE rowid='.$tab->entity;
$resql_entity_name=$this->db->query($sql_entity_name);
if ($resql_entity_name)
@ -785,11 +785,6 @@ class ExtraFields
}
}
}
else
{
$this->error=$this->db->lasterror();
dol_syslog(get_class($this)."::fetch_name_optionals_label ".$this->error, LOG_ERR);
}
}
}
if ($elementtype) $this->attributes[$elementtype]['loaded']=1;