Fixed an infinite loop
authorAlexander Ebert <ebert@woltlab.com>
Thu, 28 Jul 2016 21:30:17 +0000 (23:30 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 28 Jul 2016 21:30:17 +0000 (23:30 +0200)
wcfsetup/install/files/lib/system/cache/builder/BBCodeCacheBuilder.class.php

index bd49634e480c7b2031de7b9b8250764fb243ff00..ed3dd39a3b3919b8f4eeb2dff5ffd26465283cf8 100644 (file)
@@ -41,6 +41,11 @@ class BBCodeCacheBuilder extends AbstractCacheBuilder {
                        if (isset($attributes[$bbcode->bbcodeTag])) {
                                $bbcode->setAttributes($attributes[$bbcode->bbcodeTag]);
                        }
+                       else {
+                               // set an empty array, because the internal default value of a bbcode's
+                               // attributes is null, this avoid an infinite loop
+                               $bbcode->setAttributes([]);
+                       }
                        
                        $data['bbcodes'][$bbcode->bbcodeTag] = $bbcode;
                }