From 56e3a6f610266cd3da6bd09c2b70955198294ee3 Mon Sep 17 00:00:00 2001 From: yurg Date: Tue, 24 Oct 2017 22:56:39 +0200 Subject: [PATCH] Notice if no prev. mailing reports exist in a system (#11181) * Notice if no prev. mailing reports exist in a system https://civicrm.stackexchange.com/questions/20943/blank-page-in-mailings-with-notice/ * Update Info.php Spaces according to code style and https://test.civicrm.org/job/CiviCRM-Core-PR/17741/checkstyleResult/new/ * Update Info.php White spaces correction --- CRM/Mailing/Info.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CRM/Mailing/Info.php b/CRM/Mailing/Info.php index 59ec9e1235..50e3f07bbf 100644 --- a/CRM/Mailing/Info.php +++ b/CRM/Mailing/Info.php @@ -79,7 +79,9 @@ class CRM_Mailing_Info extends CRM_Core_Component_Info { $result = civicrm_api3('ReportInstance', 'get', array( 'sequential' => 1, 'report_id' => 'mailing/' . $report)); - $reportIds[$report] = $result['values'][0]['id']; + if (!empty($result['values'])) { + $reportIds[$report] = $result['values'][0]['id']; + } } $result = array(); $result['crmMailing'] = include "$civicrm_root/ang/crmMailing.ang.php"; -- 2.25.1