From 558bda5f27fb320533deeb53c598d26e7ec49355 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 19 Apr 2018 17:45:00 +0200 Subject: [PATCH] Fix translation of extrafields --- htdocs/core/class/extrafields.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 63098022265..c5f87777d6d 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -1028,7 +1028,7 @@ class ExtraFields $out.= (((string) $value == (string) $key)?' selected':''); $out.= (!empty($parent)?' parent="'.$parent.'"':''); $out.='>'; - if ($langfile) $out.=$langs->trans($val); + if ($langfile && $val) $out.=$langs->trans($val); else $out.=$val; $out.=''; } @@ -1492,7 +1492,7 @@ class ExtraFields } elseif ($type == 'select') { - if ($langfile) $value=$langs->trans($param['options'][$value]); + if ($langfile && $param['options'][$value]) $value=$langs->trans($param['options'][$value]); else $value=$param['options'][$value]; } elseif ($type == 'sellist')