CiviContribute - Fix warning about 'suppressedEmails' when generating PDF
authorTim Otten <totten@civicrm.org>
Wed, 15 Feb 2023 03:12:14 +0000 (19:12 -0800)
committerTim Otten <totten@civicrm.org>
Wed, 15 Feb 2023 03:12:14 +0000 (19:12 -0800)
commitec9f8dcd719cd20f6da15e05e3a65b769326cc27
tree1929da8e0cb8e5d3084a776a5d16ca7517c6a5ab
parent327bb32cda93e963a4a1800d018bd17b2e2bfb22
CiviContribute - Fix warning about 'suppressedEmails' when generating PDF

Use-case:

* Open and execute "Find Contributions"
* Next to a contribution, choose "more > Send receipt"
* Make a PDF
* Open another tab and view any other page.
* There is warning:
    Notice: Undefined index: suppressedEmails in CRM_Contribute_Form_Task_PDF->postProcess()
    (line 139 of ..../web/sites/all/modules/civicrm/CRM/Contribute/Form/Task/PDF.php)."

Before:

* `$pdfElements['suppressedEmails']` is not always returned
*  $pdfElements['excludeContactIds'] is alsways returned

After:

* Both are always returned, even if empty
CRM/Contribute/Form/Task/PDF.php