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`.
Updated by Daniel Goerz over 4 years ago
- Status changed from New to Needs Feedback
Hi Claus, looks like you are not on the latest 9.5 release as this has already been fixed with
https://review.typo3.org/c/Packages/TYPO3.CMS/+/58593
https://forge.typo3.org/issues/86589
Updated by Daniel Goerz over 4 years ago
- Is duplicate of Task #86589: Fix continue-statement inside a switch-block added
Updated by Benni Mack about 4 years ago
- Status changed from Needs Feedback to Closed
Closing this issue now (see comment from Daniel).
Actions