From ed6f186ce1fae5f6b42bfc23204e324778ab2e09 Mon Sep 17 00:00:00 2001 From: Richard Henkenjohann Date: Wed, 9 Mar 2022 22:19:42 +0100 Subject: [PATCH] Fix #8 --- src/EventListener/DataContainer/SaveClasses.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EventListener/DataContainer/SaveClasses.php b/src/EventListener/DataContainer/SaveClasses.php index 51d21c2..d400b5c 100644 --- a/src/EventListener/DataContainer/SaveClasses.php +++ b/src/EventListener/DataContainer/SaveClasses.php @@ -77,6 +77,6 @@ public function onLoadCallback($value, $dc): array $options = array_unique(array_merge(...$options)); - return array_values(array_filter($options, static fn ($option) => 1 === preg_match(sprintf('/(^|\s)(%s)(\s|$)/', preg_quote($option)), $dc->activeRecord->toolbox_classes))); + return array_values(array_filter($options, static fn ($option) => 1 === preg_match(sprintf('/(^|\s)(%s)(\s|$)/', preg_quote($option)), $dc->activeRecord->toolbox_classes ?? ''))); } }