Closed MegaphoneJon closed 2 years ago
Thanks @MegaphoneJon . Will review and (hopefully) merge soon.
Testing this PR indicates that it solves the problem described #18:
CiviCRM version 5.44.0 Extension version: master 84a3b88371d19539027bbec1a55221d040b6e521 (version "0.3")
Before:
Error messageError: Xdebug has detected a possible infinite loop, and aborted your script with a stack depth of '256' frames in Civi\Token\ImpliedContextSubscriber->getMappings() (line 105 of /[drupal-docroot]/sites/all/modules/civicrm/Civi/Token/ImpliedContextSubscriber.php).
After:
I'm merging and closing. Thanks @MegaphoneJon !
This extension causes an infinite loop (w/ eventual OOM error or segfault) anywhere it's called in Civi 5.44+. https://github.com/civicrm/civicrm-core/pull/21429 is the culprit,
registerTokens()
now calls a new functiongetLegacyHookTokens()
.Static vars aren't pretty but this extension already uses one, and it gets the job done.
To replicate this, go to any mailing screen (including a quick email) on 5.44+ with this extension enabled.