Skip to content

Commit

Permalink
PHP 7.3 continue / break clarification
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ejegg committed Nov 19, 2018
1 parent c167994 commit 94b444d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CRM/Core/BAO/CustomGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -1564,7 +1564,7 @@ public static function postProcess(&$groupTree, &$params, $skipFile = FALSE) {

case 'File':
if ($skipFile) {
continue;
break;
}

//store the file in d/b
Expand Down
2 changes: 1 addition & 1 deletion CRM/Price/BAO/PriceSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,7 @@ public static function processAmount($fields, &$params, &$lineItem, $component =
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}"]);
Expand Down

0 comments on commit 94b444d

Please sign in to comment.