Fix for ongoing issues with static upsetting the apple cart
authoreileen <emcnaughton@wikimedia.org>
Mon, 24 Aug 2020 03:22:19 +0000 (15:22 +1200)
committereileen <emcnaughton@wikimedia.org>
Wed, 26 Aug 2020 21:12:06 +0000 (09:12 +1200)
commit696737b5b83f5986edf19b7208e43cde253f2bdb
treeea00e10abded3970282b424b6d000cd7e43e3d7e
parent0374b8bba3bbd44e1e8b931cbf853f6cc024b34c
Fix for ongoing issues with static upsetting the apple cart

This is an alternate to https://github.com/civicrm/civicrm-core/pull/18218

I managed to replicate the bug in https://issues.civicrm.org/jira/browse/CRM-4213 that the static
was added to cover. This takes an alternate approach of loading the memberships & checking them
rather than a static. I think it might mean more queries but they shouldn't be expensive queries & the
code is just too hard-going to skip straight from hacked but still intermittantly buggy to also having no additional
queries
CRM/Contribute/BAO/Contribution.php
CRM/Member/BAO/Membership.php
tests/phpunit/CRM/Member/Form/MembershipTest.php
tests/phpunit/api/v3/JobTest.php
tests/phpunit/api/v3/MembershipTest.php