From dcd751aa47d165e89de25c09ecc15b97ebc61ca3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 31 Aug 2023 00:04:07 +0200 Subject: [PATCH] FIX fatal error with bad definition of dictionaries --- htdocs/admin/dict.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index ac2a8a14528..3c536d7e310 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -1674,6 +1674,9 @@ if ($id > 0) { } if (in_array($value, array('label', 'libelle', 'libelle_facture')) && empty($tabcomplete[$tabname[$id]]['help'][$value])) { + if (!is_array($tabcomplete[$tabname[$id]]['help'])) { // protection when $tabcomplete[$tabname[$id]]['help'] is a an empty string, we must force it into an array + $tabcomplete[$tabname[$id]]['help'] = array(); + } $tabcomplete[$tabname[$id]]['help'][$value] = $langs->trans('LabelUsedByDefault'); }