File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 1616use TYPO3 \CMS \Core \Cache \CacheManager ;
1717use TYPO3 \CMS \Core \Log \LogManager ;
1818use TYPO3 \CMS \Core \Routing \PageArguments ;
19+ use TYPO3 \CMS \Core \Routing \RouteResultInterface ;
1920use TYPO3 \CMS \Core \SingletonInterface ;
2021use TYPO3 \CMS \Core \Utility \ArrayUtility ;
2122use TYPO3 \CMS \Core \Utility \GeneralUtility ;
@@ -858,8 +859,11 @@ protected function readPageUidFromContext(): int
858859 /** @var ServerRequestInterface $serverRequest */
859860 $ serverRequest = $ GLOBALS ['TYPO3_REQUEST ' ];
860861
861- /** @var PageArguments $pageArguments */
862+ /** @var RouteResultInterface $pageArguments */
862863 $ pageArguments = $ serverRequest ->getAttribute ('routing ' );
864+ if (!$ pageArguments instanceof PageArguments) {
865+ return 0 ;
866+ }
863867 return $ pageArguments ->getPageId ();
864868 }
865869
You can’t perform that action at this time.
0 commit comments