Bug #103423
closedInvalid array offset error in linkvalidator
100%
Description
In \TYPO3\CMS\Linkvalidator\Result\LinkAnalyzerResult::getLocalizedPageId the linkanalyzer tries to find the UID of a page translation, with a fallback to "0" if none is found. The fallback is implemented with
// ...
->executeQuery()
->fetchAssociative()['uid'] ?: 0;
However, the method "fetchAssociative" return a boolean "false" if no record is available in the result and the "['uid']" access causes a "Trying to access array offset on false error" warning.
A possible fix is to change part of the getLocalizedPageId method to
// ...
->executeQuery()
->fetchAllAssociative()[0]['uid'] ?? 0;
Updated by Gerrit Code Review 8 months ago
- Status changed from New to Under Review
Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83582
Updated by Gerrit Code Review 8 months ago
Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83582
Updated by Gerrit Code Review 8 months ago
Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83582
Updated by Gerrit Code Review 8 months ago
Patch set 4 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83582
Updated by Gerrit Code Review 8 months ago
Patch set 5 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83582
Updated by Gerrit Code Review 8 months ago
Patch set 1 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83660
Updated by Gerrit Code Review 8 months ago
Patch set 1 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83661
Updated by Sybille Peters 8 months ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 540542b18db661af89034ff55503eaade7c835d4.