From 141b05ad6102c7e3531b5b0838dbd02b5a764b67 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Mon, 14 Mar 2022 09:31:35 +0100 Subject: [PATCH] bug type vide --- core/module/theme/theme.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/module/theme/theme.php b/core/module/theme/theme.php index 9ba6050a..d47f7fe3 100644 --- a/core/module/theme/theme.php +++ b/core/module/theme/theme.php @@ -1104,6 +1104,7 @@ class theme extends common { return ($count); } + // Retourne un tableau simple des fonts installées idfont avec le nom // Cette fonction est utile aux sélecteurs de fonts dans les formulaires. public function enumFonts() { @@ -1111,8 +1112,10 @@ class theme extends common { $f = $this->getFonts(); // Construit un tableau avec leur ID et leur famille foreach(['websafe', 'imported', 'files'] as $type) { - foreach ($f[$type] as $fontId => $fontValue ) { - $fonts [$fontId] = $fontValue['name']; + if(array_key_exists($type, $f)) { + foreach ($f[$type] as $fontId => $fontValue ) { + $fonts [$fontId] = $fontValue['name']; + } } } ksort($fonts);