Fix the return type of `getParentNode()`
authorAlexander Ebert <ebert@woltlab.com>
Sat, 16 Sep 2023 16:46:20 +0000 (18:46 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Sat, 16 Sep 2023 16:46:20 +0000 (18:46 +0200)
See https://www.woltlab.com/community/thread/301636-pagenode-getparentnode-wirft-fehler-wenn-parentnode-null/

wcfsetup/install/files/lib/data/page/PageNode.class.php

index 8794e714a99504cdb8e6d36a381018c6e7c06559..9822cbe042d6e185640124f20cd8185653a16d43 100644 (file)
@@ -73,7 +73,7 @@ class PageNode extends DatabaseObjectDecorator implements \Countable, \Recursive
     /**
      * Returns the parent node
      */
-    public function getParentNode(): self
+    public function getParentNode(): ?self
     {
         return $this->parentNode;
     }