From 94b444d09d81033b95d17b31edadb69955313641 Mon Sep 17 00:00:00 2001 From: Elliott Eggleston Date: Thu, 15 Nov 2018 15:22:22 -0500 Subject: [PATCH] PHP 7.3 continue / break clarification PHP 7.3 started warning on 'continue' statements inside switches, where they act just like 'break' statements. To actually continue the enclosing loop, it would have to be 'continue 2'. Since that's a weird syntax and these two cases have nothing after the switch, I've replaced them here with break. --- CRM/Core/BAO/CustomGroup.php | 2 +- CRM/Price/BAO/PriceSet.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CRM/Core/BAO/CustomGroup.php b/CRM/Core/BAO/CustomGroup.php index cffdac62c0..085194fdf5 100644 --- a/CRM/Core/BAO/CustomGroup.php +++ b/CRM/Core/BAO/CustomGroup.php @@ -1564,7 +1564,7 @@ ORDER BY civicrm_custom_group.weight, case 'File': if ($skipFile) { - continue; + break; } //store the file in d/b diff --git a/CRM/Price/BAO/PriceSet.php b/CRM/Price/BAO/PriceSet.php index 922653857d..670bb0fb8c 100644 --- a/CRM/Price/BAO/PriceSet.php +++ b/CRM/Price/BAO/PriceSet.php @@ -737,7 +737,7 @@ WHERE id = %1"; case 'Radio': //special case if user select -none- if ($params["price_{$id}"] <= 0) { - continue; + break; } $params["price_{$id}"] = array($params["price_{$id}"] => 1); $optionValueId = CRM_Utils_Array::key(1, $params["price_{$id}"]); -- 2.25.1