Avoid issues with corrupted smiley category data
authorAlexander Ebert <ebert@woltlab.com>
Thu, 27 Apr 2017 10:17:59 +0000 (12:17 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 27 Apr 2017 10:17:59 +0000 (12:17 +0200)
wcfsetup/install/files/lib/system/html/input/node/HtmlInputNodeTextParser.class.php

index eb8d92c8fe5672852b9592f1e61e0e18e0f35abc..ba768e1b034519ff2760ff4d98132cb34b62418f 100644 (file)
@@ -96,7 +96,7 @@ class HtmlInputNodeTextParser {
                        $categories = SmileyCache::getInstance()->getCategories();
                        
                        foreach ($smilies as $categoryID => $categorySmilies) {
-                               if ($categories[$categoryID ?: null]->isDisabled) continue;
+                               if (!array_key_exists($categoryID ?: null, $categories) || $categories[$categoryID ?: null]->isDisabled) continue;
                                
                                /** @var Smiley $smiley */
                                foreach ($categorySmilies as $smiley) {