Fixed usage of continue in switches 3.0.final
authorMarcel Werk <burntime@woltlab.com>
Fri, 18 May 2018 08:42:42 +0000 (10:42 +0200)
committerMarcel Werk <burntime@woltlab.com>
Thu, 30 Jul 2020 11:17:59 +0000 (13:17 +0200)
files/lib/system/exporter/MyBB16xExporter.class.php
files/lib/system/exporter/SMF2xExporter.class.php
files/lib/system/exporter/XF12xExporter.class.php

index 144808fc1b24f126a9f81c6237fb245beb007169..4440fd04555a73c7bc3b87370d853f46cde4cb50 100644 (file)
@@ -382,7 +382,7 @@ class MyBB16xExporter extends AbstractExporter {
                                break;
                                default:
                                        $type = explode("\n", $row['type'], 2);
-                                       if (count($type) < 2) continue;
+                                       if (count($type) < 2) continue 2;
                                        switch ($type[0]) {
                                                case 'select':
                                                        $row['type'] = $type[0];
@@ -394,7 +394,7 @@ class MyBB16xExporter extends AbstractExporter {
                                                        $row['type'] = 'radioButton';
                                                break;
                                                default:
-                                                       continue;
+                                                       continue 3;
                                        }
                                        
                                        $selectOptions = $type[1];
index cbed0e9f82a07fa4692f721235296a8775cd0e3c..a33578f3fe42cf1389b8a5c3ba8f134805d65800 100644 (file)
@@ -393,7 +393,7 @@ class SMF2xExporter extends AbstractExporter {
                                        $row['field_type'] = 'boolean';
                                break;
                                default:
-                                       continue;
+                                       continue 2;
                        }
                        
                        switch ($row['private']) {
index 2e0030a6f019bda07d8bbe6648f6778cf6c10e51..c5d70cab820c45bba3db00b4a9ad564fe163b8ab 100644 (file)
@@ -303,6 +303,8 @@ class XF12xExporter extends AbstractExporter {
                        
                        if ($customFields) {
                                foreach ($customFields as $key => $value) {
+                                       if (is_array($value)) continue;
+                                       
                                        if (in_array($key, self::$knownProfileFields)) {
                                                $options[$key] = $value;
                                                continue;
@@ -409,7 +411,7 @@ class XF12xExporter extends AbstractExporter {
                                        $row['field_type'] = 'boolean';
                                        break;
                                default:
-                                       continue;
+                                       continue 2;
                        }
                                
                        $selectOptions = [];