[TASK] Fix continue-statement inside a switch-block 93/58593/2
authorStefan Neufeind <typo3.neufeind@speedpartner.de>
Sun, 7 Oct 2018 23:37:18 +0000 (01:37 +0200)
committerBenni Mack <benni@typo3.org>
Sun, 28 Oct 2018 13:00:50 +0000 (14:00 +0100)
Calling continue inside a switch-block would work just like break.
This is usually not intended and thus triggers a warning since
PHP 7.3.0.

Resolves: #86589
Releases: master, 8.7, 7.6
Change-Id: Ic35998b8a37bd35110b9d3494f1cf258e845097a
Reviewed-on: https://review.typo3.org/58593
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Stefan Froemken <froemken@gmail.com>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog <susanne.moog@typo3.org>
Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
typo3/sysext/core/Classes/Utility/ExtensionManagementUtility.php

index 8414355..2895c4c 100644 (file)
@@ -332,14 +332,14 @@ class ExtensionManagementUtility
                                     // check if fields have been added to palette before
                                     if (isset($palettesChanged[$paletteName])) {
                                         $fieldExists = true;
-                                        continue;
+                                        continue 2;
                                     }
                                     if (preg_match('/\\b' . $entityName . '\\b/', $palette['showitem']) > 0) {
                                         self::addFieldsToPalette($table, $paletteName, $newFieldsString, $position);
                                         // Memorize that we already changed this palette, in case other types also use it
                                         $palettesChanged[$paletteName] = true;
                                         $fieldExists = true;
-                                        continue;
+                                        continue 2;
                                     }
                                     break;
                                 default: