From: DemeritCowboy Date: Wed, 9 Oct 2019 22:31:30 +0000 (-0400) Subject: be less loopy X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=d97af030cf7a586a4582a5fecd7e9f92c5f446fe;p=civicrm-core.git be less loopy --- diff --git a/CRM/Utils/DeprecatedUtils.php b/CRM/Utils/DeprecatedUtils.php index 0045346efe..ed07a6b2aa 100644 --- a/CRM/Utils/DeprecatedUtils.php +++ b/CRM/Utils/DeprecatedUtils.php @@ -884,6 +884,10 @@ function _civicrm_api3_deprecated_activity_buildmailparams($result, $activityTyp if (isset($result["attachFile_$i"])) { $params["attachFile_$i"] = $result["attachFile_$i"]; } + else { + // No point looping 100 times if there's only one attachment + break; + } } return $params;