Skip to content

Commit

Permalink
if no clicks, display 0 rather than empty string
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcclelland committed Mar 1, 2024
1 parent 41fea34 commit 0761015
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions CRM/Mailing/BAO/Mailing.php
Original file line number Diff line number Diff line change
Expand Up @@ -2820,10 +2820,10 @@ public static function getContactMailingSelector(&$params) {
"mid={$values['mailing_id']}&reset=1&cid={$params['contact_id']}&event=queue&context=mailing");
$mailing['start_date'] = CRM_Utils_Date::customFormat($values['start_date']);
//CRM-12814
$mailing['openstats'] = "Opens: " .
CRM_Utils_Array::value($values['mailing_id'], $openCounts, 0) .
"<br />Clicks: " .
$clickCounts[$values['mailing_id']] ?? 0;
$clicks = $clickCounts[$values['mailing_id']] ?? 0;
$opens = $openCounts[$values['mailing_id']] ?? 0;
$mailing['openstats'] = "Opens: {$opens}" .
"<br />Clicks: {$clicks}";

$actionLinks = [
CRM_Core_Action::VIEW => [
Expand Down

0 comments on commit 0761015

Please sign in to comment.