(dev/event#15) Fix regression in handling of post profiles in email #15380
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Fixes a regression from 5.17.0 when sending a confirmation email. If event uses any "post" profile forms, then the confirmation email includes subsections to summarize each post-profile. The subsection titles were miscomputed. This manifested as either a page crash or an inaccurate title.
See also: https://lab.civicrm.org/dev/event/issues/15
Before
After
Technical Details
The previous code took an array (
$postProfileID
) and casted it to anint
. This produced an arbitrary int (0
or1
). The revised code handles the array as an array.