Cleanly handle no default attributes being set

This commit is contained in:
Belle Aerni 2023-03-26 23:40:02 -07:00
parent 90f0f96f13
commit 0e252133e2
1 changed files with 1 additions and 1 deletions

View File

@ -40,7 +40,7 @@ class AntMarkdown
$defaultAttributes = [];
$themeConfig = AntCMS::getThemeConfig();
foreach ($themeConfig['defaultAttributes'] as $class => $attributes) {
foreach (($themeConfig['defaultAttributes'] ?? []) as $class => $attributes) {
$reflectionClass = new \ReflectionClass($class);
$fqcn = $reflectionClass->getName();
$defaultAttributes[$fqcn] = $attributes;