From c506af6763bb7c9b8d7276e80f905827ba1de43e Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Wed, 13 Nov 2024 13:09:38 +0100 Subject: [PATCH] Nested nodes may already be removed during this process --- .../install/files/lib/system/bbcode/DomBBCodeParser.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/system/bbcode/DomBBCodeParser.class.php b/wcfsetup/install/files/lib/system/bbcode/DomBBCodeParser.class.php index eb4ceb4cdd..9b8df5f265 100644 --- a/wcfsetup/install/files/lib/system/bbcode/DomBBCodeParser.class.php +++ b/wcfsetup/install/files/lib/system/bbcode/DomBBCodeParser.class.php @@ -118,7 +118,7 @@ final class DomBBCodeParser extends SingletonFactory $node->setAttribute('data-attributes', \base64_encode(JSON::encode($attributes))); } foreach ($nodes as $node) { - $node->parentNode->removeChild($node); + $node->parentNode?->removeChild($node); } } -- 2.20.1