Blank Invoice.pdf appearing when doing Offline contributions
Hi there,
Recently, my client noticed that Offline contributions made via Submit a Credit Card Membership
were sending out blank Invoice pdfs. I don't think that this was happening previously.
How to reproduce
- Go to new member contact record and select "Membership" tab
- Choose "Submit credit card membership"
- Enter membership details and select "Save"
- Receipt is automatically sent to member
CiviCRM details
- CiviCRM 5.49.4
- Drupal 7
Log Error message
2022/10/21 09:48:39 [error] 25282#25282: *7533568 FastCGI sent in stderr: "emplate.php).PHP message: [notice] [php] [209.169.169.221] [uid:1] [https://test.org/civicrm/contact/view/membership] [https://test.org/civicrm/contact/view/membership?reset=1&action=add&cid=107793&context=membership&mode=test] Notice: Undefined variable: html in CRM_Contribute_Form_Task_Invoice::printPDF() (line 516 of /sites/all/modules/civicrm/CRM/Contribute/Form/Task/Invoice.php).
PHP message: [notice] [php] [209.169.169.221] [uid:1] [https://test.org/civicrm/contact/view/membership] [https://test.org/civicrm/contact/view/membership?reset=1&action=add&cid=107793&context=membership&mode=test] Notice: Only variable references should be returned by reference in CRM_Mailing_Event_BAO_Delivered::create() (line 34 of /sites/all/modules/civicrm/CRM/Mailing/Event/BAO/Delivered.php)" while reading response header from upstream, client: 209.169.169.221, server: test.org, request: "POST /civicrm/contact/view/membership HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php7.3-fpm.sock:", host: "test.org", referrer: "https://test.org/civicrm/contact/view/membership?reset=1&action=add&cid=107793&context=membership&mode=test"