From c0824afdeb890507702c37050b4f2db85cadafbd Mon Sep 17 00:00:00 2001 From: Jon Goldberg Date: Mon, 23 Oct 2023 11:54:15 -0400 Subject: [PATCH] fixes core#4724 - on behalf of addresses crash with missing state/province --- CRM/Contribute/Form/Contribution/Confirm.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Contribute/Form/Contribution/Confirm.php b/CRM/Contribute/Form/Contribution/Confirm.php index a94a9767dc..aaf44b1f3e 100644 --- a/CRM/Contribute/Form/Contribution/Confirm.php +++ b/CRM/Contribute/Form/Contribution/Confirm.php @@ -328,7 +328,7 @@ class CRM_Contribute_Form_Contribution_Confirm extends CRM_Contribute_Form_Contr [$field, $locType] = explode('-', $loc); } - if (in_array($field, $addressBlocks)) { + if (in_array($field, $addressBlocks) && !empty($value)) { if ($locType === 'Primary') { $defaultLocationType = CRM_Core_BAO_LocationType::getDefault(); $locType = $defaultLocationType->id; -- 2.25.1