[BUGFIX] Fix PHP 8 warning in LinkValidatorController
The variable $row['url_response']['errorParams'] should always contain a value. Either the actual error message array or an empty array to avoid a PHP 8 warning. The corresponding getErrorMessage methods now have a guard clause to check if the array is empty to avoid further propagated warnings. In TYPO3 v13 that signature of the getErrorMessage should be changed to be array. The array $errorParams is always initialized to an empty array instead of null. IN TYPO3 v13 the default value of $errorParams should be [] instead of null. Resolves: #99988 Releases: main, 11.5 Change-Id: I0f7e10f45e0f5ec7e80b79d705b38fda9a3f1410 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/78812 Tested-by:core-ci <typo3@b13.com> Reviewed-by:
Stefan Bürk <stefan@buerk.tech> Tested-by:
Stefan Bürk <stefan@buerk.tech>
Showing
- typo3/sysext/linkvalidator/Classes/LinkAnalyzer.php 1 addition, 1 deletiontypo3/sysext/linkvalidator/Classes/LinkAnalyzer.php
- typo3/sysext/linkvalidator/Classes/Linktype/AbstractLinktype.php 1 addition, 0 deletions...ysext/linkvalidator/Classes/Linktype/AbstractLinktype.php
- typo3/sysext/linkvalidator/Classes/Linktype/ExternalLinktype.php 4 additions, 0 deletions...ysext/linkvalidator/Classes/Linktype/ExternalLinktype.php
- typo3/sysext/linkvalidator/Classes/Linktype/FileLinktype.php 1 addition, 0 deletionstypo3/sysext/linkvalidator/Classes/Linktype/FileLinktype.php
- typo3/sysext/linkvalidator/Classes/Linktype/InternalLinktype.php 7 additions, 2 deletions...ysext/linkvalidator/Classes/Linktype/InternalLinktype.php
- typo3/sysext/linkvalidator/Classes/Linktype/LinktypeInterface.php 2 additions, 0 deletions...sext/linkvalidator/Classes/Linktype/LinktypeInterface.php
- typo3/sysext/linkvalidator/Classes/Repository/BrokenLinkRepository.php 11 additions, 3 deletions...linkvalidator/Classes/Repository/BrokenLinkRepository.php
Please register or sign in to comment