From 625e440653b71b0b18821408fafd61e6cf064953 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Mon, 9 Oct 2017 16:50:20 +0200 Subject: [PATCH] Fix: wrong test --- htdocs/core/class/html.form.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index e7902fe3289..3066c7c9518 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -6021,9 +6021,9 @@ class Form { $fullname=$object->getFullName($langs); if ($object->morphy == 'mor') { - $ret.= dol_htmlentities($object->societe) . (($object->societe != $fullname)?' ('.dol_htmlentities($fullname).')':''); + $ret.= dol_htmlentities($object->societe) . ((! empty($fullname) && $object->societe != $fullname)?' ('.dol_htmlentities($fullname).')':''); } else { - $ret.= dol_htmlentities($fullname) . (($object->societe != $fullname)?' ('.dol_htmlentities($object->societe).')':''); + $ret.= dol_htmlentities($fullname) . ((! empty($object->societe) && $object->societe != $fullname)?' ('.dol_htmlentities($object->societe).')':''); } } else if (in_array($object->element, array('contact', 'user', 'usergroup')))