Project

General

Profile

Actions

Bug #95166

closed

Linkvalidator breaks if no pageUid

Added by Michael Sollmann over 2 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Linkvalidator
Target version:
-
Start date:
2021-09-09
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
no-brainer
Is Regression:
Sprint Focus:

Description

The linkvalidator breaks if no pageUid is given. If in inline records (IRRE), these records could not be opened anymore.

Error:
Uncaught TYPO3 Exception: htmlspecialchars() expects parameter 1 to be string, null given | TypeError thrown in file [...]typo3_src-10.4.14/typo3/sysext/linkvalidator/Classes/EventListener/CheckBrokenRteLinkEventListener.php in line 67.

Possible solution:

// Page does not exist
if (!is_array($pageRecord)) {
        if ($hrefInformation['pageuid'])
            $event->markAsBrokenLink('Page with ID ' . htmlspecialchars($hrefInformation['pageuid']) . ' not found');
        else
            $event->markAsBrokenLink('Page not found - missing ID');
}

Actions

Also available in: Atom PDF