Skip to content

Fix logic of handling optional "On Behalf Of Organization"

Monish Deb requested to merge github/fork/webmaster-cses-org-uk/patch-1 into master

Created by: webmaster-cses-org-uk

This PR is intended to fix https://github.com/JMAConsulting/biz.jmaconsulting.grantapplications/issues/173.

Correct form processing logic so that if no "On Behalf Of Organization" information is entered, it is not processed.

At the moment, the code checks for isset(), but due to the way the form data is processed above, these variables will always be set but may just be empty if no organization information is entered.

This change corrects the logic so you don't get spurious creation of blank organisations. Tested and working on CiviCRM 5.37.0.

Merge request reports