From 503e4fbfde8e4972c0d4db432947f220e4a4874a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=A9=E9=87=8E=E9=BE=8D=E5=8F=B8?= Date: Tue, 2 Jul 2019 20:24:58 +0900 Subject: [PATCH] =?UTF-8?q?PHP7.3=E3=81=A7switch=E4=B8=AD=E3=81=AEcontinue?= =?UTF-8?q?=E3=81=A7warning=E3=81=A7=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= =?UTF-8?q?=E3=81=AA=E3=81=A3=E3=81=9F=E3=81=AE=E3=81=A7break=E3=81=AB?= =?UTF-8?q?=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://qiita.com/rana_kualu/items/3f28ac0e284ec968b834#continue-targeting-switch-issues-warning --- html/kernel/object.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/html/kernel/object.php b/html/kernel/object.php index 7fd127ad8..7cdc5ffd4 100644 --- a/html/kernel/object.php +++ b/html/kernel/object.php @@ -502,11 +502,11 @@ public function cleanVars() case XOBJ_DTYPE_TXTBOX: if ($v['required'] && $cleanv != '0' && $cleanv == '') { $this->setErrors("$k is required."); - continue; + break; } if (isset($v['maxlength']) && strlen($cleanv) > (int)$v['maxlength']) { $this->setErrors("$k must be shorter than ".(int)$v['maxlength']." characters."); - continue; + break; } if (!$v['not_gpc']) { $cleanv = $ts->stripSlashesGPC($ts->censorString($cleanv)); @@ -517,7 +517,7 @@ public function cleanVars() case XOBJ_DTYPE_TXTAREA: if ($v['required'] && $cleanv != '0' && $cleanv == '') { $this->setErrors("$k is required."); - continue; + break; } if (!$v['not_gpc']) { $cleanv = $ts->stripSlashesGPC($ts->censorString($cleanv)); @@ -548,11 +548,11 @@ public function cleanVars() case XOBJ_DTYPE_EMAIL: if ($v['required'] && $cleanv == '') { $this->setErrors("$k is required."); - continue; + break; } if ($cleanv != '' && !preg_match("/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+([\.][a-z0-9-]+)+$/i", $cleanv)) { $this->setErrors("Invalid Email"); - continue; + break; } if (!$v['not_gpc']) { $cleanv = $ts->stripSlashesGPC($cleanv); @@ -561,7 +561,7 @@ public function cleanVars() case XOBJ_DTYPE_URL: if ($v['required'] && $cleanv == '') { $this->setErrors("$k is required."); - continue; + break; } if ($cleanv != '' && !preg_match("/^http[s]*:\/\//i", $cleanv)) { $cleanv = 'http://' . $cleanv;