From bdaf4ff973029c3f9f3c39f424836105d8ff80ba Mon Sep 17 00:00:00 2001 From: Jamie McClelland Date: Wed, 21 Feb 2018 17:11:27 -0500 Subject: [PATCH] ensure pdfFilename is set Avoid setting the filename to a non-existent variable. --- CRM/Contribute/Form/Task/Invoice.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/CRM/Contribute/Form/Task/Invoice.php b/CRM/Contribute/Form/Task/Invoice.php index 8f2a406dff..b97524a8ab 100644 --- a/CRM/Contribute/Form/Task/Invoice.php +++ b/CRM/Contribute/Form/Task/Invoice.php @@ -494,7 +494,6 @@ class CRM_Contribute_Form_Task_Invoice extends CRM_Contribute_Form_Task { list($sent, $subject, $message, $html) = CRM_Core_BAO_MessageTemplate::sendTemplate($sendTemplateParams); // functions call for adding activity with attachment - $pdfFileName = "{$invoiceNumber}.pdf"; $fileName = self::putFile($html, $pdfFileName); self::addActivities($subject, $contribution->contact_id, $fileName, $params); } @@ -509,7 +508,6 @@ class CRM_Contribute_Form_Task_Invoice extends CRM_Contribute_Form_Task { list($sent, $subject, $message, $html) = CRM_Core_BAO_MessageTemplate::sendTemplate($sendTemplateParams); // functions call for adding activity with attachment - $pdfFileName = "{$invoiceNumber}.pdf"; $fileName = self::putFile($html, $pdfFileName); self::addActivities($subject, $contribution->contact_id, $fileName, $params); } @@ -521,7 +519,6 @@ class CRM_Contribute_Form_Task_Invoice extends CRM_Contribute_Form_Task { return $html; } else { - $pdfFileName = "{$invoiceNumber}.pdf"; CRM_Utils_PDF_Utils::html2pdf($messageInvoice, $pdfFileName, FALSE, array( 'margin_top' => 10, 'margin_left' => 65, -- 2.25.1