Closed DanielSiepmann closed 1 year ago
Looks like I had blind eyes, this got already fixed that way: https://github.com/georgringer/news/blob/main/Classes/Controller/NewsController.php#L652 I could swear I checked that line before creating the issue.
;)
Bug Report
Current Behavior A PHP Warning is logged for PHP 8.1 when defining a TypoScript property with applied stdWrap that does only have subkeys but no content on main level, e.g.:
The code only properly checks for
categories.
but expectscategories
to exist as well.Expected behavior/output Proper checks for existing entries with proper fallback, instead of a warning.
Environment
Possible Solution Add proper null Coalescing operator to define fallback. The operator exists since PHP 7.0: https://www.php.net/manual/en/migration70.new-features.php#migration70.new-features.null-coalesce-op The oldest supported TYPO3 version is v10 which requires at least PHP 7.2.
Additional context I'll provide a PR for this issue. I just created this Issue as reference.