diff --git a/typo3/sysext/linkvalidator/Classes/Task/ValidatorTask.php b/typo3/sysext/linkvalidator/Classes/Task/ValidatorTask.php index 0de4b10bed5268d2cb9574c85f88ec8fd12a5bad..e4f7b5d4c7aa825c3dec11fd3d8a8420c1fabe4a 100644 --- a/typo3/sysext/linkvalidator/Classes/Task/ValidatorTask.php +++ b/typo3/sysext/linkvalidator/Classes/Task/ValidatorTask.php @@ -305,6 +305,7 @@ class ValidatorTask extends AbstractTask * * @param int $page Uid of the page to parse * @return string $pageSections Content of page section + * @throws \InvalidArgumentException */ protected function checkPageLinks($page) { @@ -321,6 +322,12 @@ class ValidatorTask extends AbstractTask $rootLineHidden = false; } else { $pageRow = BackendUtility::getRecord('pages', $page, '*', '', false); + if ($pageRow === null) { + throw new \InvalidArgumentException( + sprintf($this->getLanguageService()->sL($this->languageFile . ':tasks.error.invalidPageUid'), $page), + 1502800555 + ); + } $rootLineHidden = $processor->getRootLineIsHidden($pageRow); } if (!$rootLineHidden || $modTs['checkhidden'] == 1) { diff --git a/typo3/sysext/linkvalidator/Resources/Private/Language/locallang.xlf b/typo3/sysext/linkvalidator/Resources/Private/Language/locallang.xlf index 9af0f8c8adb6ab1c13b538145ab7d3e518a13b57..9adf68e338ec8f0206b9ade2e52b48a3d7d5e765 100644 --- a/typo3/sysext/linkvalidator/Resources/Private/Language/locallang.xlf +++ b/typo3/sysext/linkvalidator/Resources/Private/Language/locallang.xlf @@ -54,6 +54,9 @@ <trans-unit id="tasks.error.invalidEmailTemplateFile"> <source>The email template file is not existing!</source> </trans-unit> + <trans-unit id="tasks.error.invalidPageUid"> + <source>The given page id %d is invalid!</source> + </trans-unit> </body> </file> </xliff>