----------------------------------------
* CRM-17055: Confirmation email on unpaid events produces syntax error with invoicing
https://issues.civicrm.org/jira/browse/CRM-17055
$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'];
}