diff --git a/core/module/theme/theme.php b/core/module/theme/theme.php
index 5971c475..39c562a8 100644
--- a/core/module/theme/theme.php
+++ b/core/module/theme/theme.php
@@ -578,36 +578,37 @@ class theme extends common {
// Parcourir les fontes disponibles et construire le tableau pour le formulaire
foreach ($f as $type => $typeValue) {
-
- foreach ($typeValue as $fontId => $fontValue) {
- // Fontes utilisées par les thèmes
- $fontUsed[$fontId] = '';
- foreach ($used as $key => $value) {
- if ( $value === $fontId) {
- $fontUsed[$fontId] .= $key . '
';
+ if (is_array($typeValue)) {
+ foreach ($typeValue as $fontId => $fontValue) {
+ // Fontes utilisées par les thèmes
+ $fontUsed[$fontId] = '';
+ foreach ($used as $key => $value) {
+ if ( $value === $fontId) {
+ $fontUsed[$fontId] .= $key . '
';
+ }
}
+ self::$fontsDetail [] = [
+ $fontId,
+ '' . $f[$type][$fontId]['name'] . '' ,
+ $f[$type][$fontId]['font-family'],
+ $fontUsed[$fontId],
+ $type,
+ $type !== 'websafe' ? template::button('themeFontEdit' . $fontId, [
+ 'class' => 'themeFontEdit',
+ 'href' => helper::baseUrl() . $this->getUrl(0) . '/fontEdit/' . $type . '/' . $fontId . '/' . $_SESSION['csrf'],
+ 'value' => template::ico('pencil'),
+ 'disabled' => !empty($fontUsed[$fontId])
+ ])
+ : '',
+ $type !== 'websafe' ? template::button('themeFontDelete' . $fontId, [
+ 'class' => 'themeFontDelete buttonRed',
+ 'href' => helper::baseUrl() . $this->getUrl(0) . '/fontDelete/' . $type . '/' . $fontId . '/' . $_SESSION['csrf'],
+ 'value' => template::ico('cancel'),
+ 'disabled' => !empty($fontUsed[$fontId])
+ ])
+ : ''
+ ];
}
- self::$fontsDetail [] = [
- $fontId,
- '' . $f[$type][$fontId]['name'] . '' ,
- $f[$type][$fontId]['font-family'],
- $fontUsed[$fontId],
- $type,
- $type !== 'websafe' ? template::button('themeFontEdit' . $fontId, [
- 'class' => 'themeFontEdit',
- 'href' => helper::baseUrl() . $this->getUrl(0) . '/fontEdit/' . $type . '/' . $fontId . '/' . $_SESSION['csrf'],
- 'value' => template::ico('pencil'),
- 'disabled' => !empty($fontUsed[$fontId])
- ])
- : '',
- $type !== 'websafe' ? template::button('themeFontDelete' . $fontId, [
- 'class' => 'themeFontDelete buttonRed',
- 'href' => helper::baseUrl() . $this->getUrl(0) . '/fontDelete/' . $type . '/' . $fontId . '/' . $_SESSION['csrf'],
- 'value' => template::ico('cancel'),
- 'disabled' => !empty($fontUsed[$fontId])
- ])
- : ''
- ];
}
}
sort(self::$fontsDetail);