diff --git a/typo3/sysext/backend/Classes/Configuration/TypoScript/ConditionMatching/ConditionMatcher.php b/typo3/sysext/backend/Classes/Configuration/TypoScript/ConditionMatching/ConditionMatcher.php
index a4d9523410018ab8c5eb0e39b7bb4c865e4eacd6..ac9dd6f42ca6fbb580dc4ab9617d292df6685672 100644
--- a/typo3/sysext/backend/Classes/Configuration/TypoScript/ConditionMatching/ConditionMatcher.php
+++ b/typo3/sysext/backend/Classes/Configuration/TypoScript/ConditionMatching/ConditionMatcher.php
@@ -39,7 +39,7 @@ class ConditionMatcher extends AbstractConditionMatcher
         $this->context = $context ?? GeneralUtility::makeInstance(Context::class);
         $this->pageId = $pageId ?? $this->determinePageId();
         if ($rootLine === null) {
-            $rootLine = BackendUtility::BEgetRootLine($pageId, '', true);
+            $rootLine = BackendUtility::BEgetRootLine($this->pageId, '', true);
             ksort($rootLine);
         }
         $this->rootline = $rootLine;