From: Alexander Ebert Date: Thu, 28 Jul 2016 21:30:17 +0000 (+0200) Subject: Fixed an infinite loop X-Git-Tag: 3.0.0_Beta_1~926 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=100d4115ecab873283e22a1ee87a5fca726618f1;p=GitHub%2FWoltLab%2FWCF.git Fixed an infinite loop --- diff --git a/wcfsetup/install/files/lib/system/cache/builder/BBCodeCacheBuilder.class.php b/wcfsetup/install/files/lib/system/cache/builder/BBCodeCacheBuilder.class.php index bd49634e48..ed3dd39a3b 100644 --- a/wcfsetup/install/files/lib/system/cache/builder/BBCodeCacheBuilder.class.php +++ b/wcfsetup/install/files/lib/system/cache/builder/BBCodeCacheBuilder.class.php @@ -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; }