diff --git a/typo3/sysext/backend/Classes/Tree/TreeNodeCollection.php b/typo3/sysext/backend/Classes/Tree/TreeNodeCollection.php
index 368da2a6a8fa0466bb67b88d20e2601a17eb5551..699310c8ef0741c18bbabaa9db4184c05fbd2fe9 100644
--- a/typo3/sysext/backend/Classes/Tree/TreeNodeCollection.php
+++ b/typo3/sysext/backend/Classes/Tree/TreeNodeCollection.php
@@ -41,8 +41,10 @@ class TreeNodeCollection extends \ArrayObject
 
     /**
      * Sorts the internal nodes array
+     *
+     * @param int $flags Optional parameter, ignored. Added to be compatible with asort method signature in PHP 8.
      */
-    public function asort()
+    public function asort($flags = SORT_REGULAR)
     {
         $this->uasort([$this, 'nodeCompare']);
     }