Event Confirmation Email causes fatal error if post-profiles are configured (5.18 regression)
To reproduce:
- Setup an Event
- Enable email confirmations
- Configure a post-profile for the online registration
- Ensure that
civicrm_uf_group
withid=1
does NOT exist.
Then register for the event.
Result: fatal error: "Expected one UFGroup but found 0"
Backtrace:
[file] => CRM/Event/BAO/Event.php
[line] => 1155
[function] => getFrontEndTitle
[class] => CRM_Core_BAO_UFGroup
[type] => ::
[args] => Array
(
[0] => 1
)
In sendEmail
, the code assumes that the postProfile is formatted the same as preProfile, but because we can have multiple postProfiles (and only one preProfile), the postProfile is an array.
https://github.com/civicrm/civicrm-core/blob/master/CRM/Event/BAO/Event.php#L1155
cc @eileen