From af610ea9f835a14e35a002e84791c4e6ad74bebc Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 19 Dec 2023 18:47:42 +0100 Subject: [PATCH] Fix warning --- htdocs/core/class/html.form.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index c656a42a3ea..a714c6c6c0f 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -8735,10 +8735,10 @@ class Form $tmplabelhtml = ''; if (is_array($value) && array_key_exists('id', $value) && array_key_exists('label', $value)) { $tmpkey = $value['id']; - $tmpvalue = $value['label']; - $tmpcolor = $value['color']; - $tmppicto = $value['picto']; - $tmplabelhtml = !empty($value['labelhtml']) ? $value['labelhtml'] : ''; + $tmpvalue = empty($value['label']) ? '' : $value['label']; + $tmpcolor = empty($value['color']) ? '' : $value['color']; + $tmppicto = empty($value['picto']) ? '' : $value['picto']; + $tmplabelhtml = empty($value['labelhtml']) ? '' : $value['labelhtml']; } $newval = ($translate ? $langs->trans($tmpvalue) : $tmpvalue); $newval = ($key_in_label ? $tmpkey . ' - ' . $newval : $newval);