Actions
Bug #91255
closedPHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in typo3/sysext/core/Classes/Utility/ExtensionManagementUtility.php on line 314
Status:
Closed
Priority:
Must have
Assignee:
-
Category:
-
Target version:
-
Start date:
2020-05-01
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:
Description
In TYPO3 9.5, the ExtensionManagementUtility's `addToAllTCAtypes` method contains a loop with a switch inside. The "replace" switch cases attempts to continue to loop without providing a continuation level and this raises the above mentioned PHP warning.
foreach ($paletteNames as $paletteName) { // TRUNCATED EXAMPLE switch ($positionIdentifier) { case 'after': case 'before': // TRUNCATED EXAMPLE break; case 'replace': // TRUNCATED EXAMPLE (2 occurrences total) continue; continue; break; default: // Intentionally left blank } }
Can be easily fixed by using `continue 2` instead of simply `continue`.
Actions