Reintroduce the previous check for the option’s existence
authorAlexander Ebert <ebert@woltlab.com>
Fri, 25 Aug 2023 14:37:39 +0000 (16:37 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 25 Aug 2023 14:37:39 +0000 (16:37 +0200)
wcfsetup/install/files/lib/system/cache/builder/TemplateListenerCodeCacheBuilder.class.php

index 693a1367f9b03b1cef596b1d7426a5569a6c9014..69ff8dff4f362206448d039f52f0b5b66a5a4748 100644 (file)
@@ -44,7 +44,7 @@ class TemplateListenerCodeCacheBuilder extends AbstractCacheBuilder
                     $options = \explode(',', \strtoupper($templateListener->options));
 
                     $options = \array_map(static function ($value) {
-                        return "(" . $value . ")";
+                        return "('{$value}'|defined && {$value})";
                     }, $options);
 
                     $templateCode .= '(' . \implode(' || ', $options) . ')';