twomice / com.joineryhq.reltoken

CiviCRM extension: Provides tokens for any related contact, for all available contact tokens. E.g., to get the spouse's first name, or parent's marriage date.
Other
1 stars 5 forks source link

fix rendering, avoid type error #23

Open MegaphoneJon opened 1 year ago

MegaphoneJon commented 1 year ago

Before this PR, $renderedToken is treated as an array on line 85, then as a string on line 96. This led to a type error. On closer examination, I also realized we were rendering the same token twice. So instead of rendering twice, I'm cleaning up the code so we render once, and use the rendered value in the second loop.