CRM-17055: Confirmation email on unpaid events produces syntax error with invoicing
authorFrancis Whittle <francis@agileware.com.au>
Wed, 16 Sep 2015 07:18:06 +0000 (17:18 +1000)
committerCiviCRM Development tree server <civicrm-dev@launchpad.agileware.com.au>
Wed, 16 Sep 2015 07:24:59 +0000 (17:24 +1000)
----------------------------------------
* CRM-17055: Confirmation email on unpaid events produces syntax error with invoicing
  https://issues.civicrm.org/jira/browse/CRM-17055

CRM/Event/BAO/Event.php

index 0753ac83979cf2b427193b81119231f552f8808c..946b51a73437ab9881be95495ed6f997391ec135 100644 (file)
@@ -1243,7 +1243,7 @@ WHERE civicrm_event.is_active = 1
           $taxAmt = $template->get_template_vars('totalTaxAmount');
           $prefixValue = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::CONTRIBUTE_PREFERENCES_NAME, 'contribution_invoice_settings');
           $invoicing = CRM_Utils_Array::value('invoicing', $prefixValue);
-          if (isset($invoicing) && isset($prefixValue['is_email_pdf'])) {
+          if (isset($invoicing) && isset($prefixValue['is_email_pdf']) && !empty($values['contributionId'])) {
             $sendTemplateParams['isEmailPdf'] = TRUE;
             $sendTemplateParams['contributionId'] = $values['contributionId'];
           }