From f09d78c2111d6f51770ef79f08aa13c3492d75f7 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Fri, 3 Apr 2020 09:38:05 -0400 Subject: [PATCH] Remove reference to obsolete field type and simplify statement The history of this section of code is murky but from what I can tell, this is applying special formatting to checkboxes. So instead of a double-negative conditional "not field types that are not checkbox" let's just say "if checkbox". --- CRM/Contribute/Form/Contribution/Confirm.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/CRM/Contribute/Form/Contribution/Confirm.php b/CRM/Contribute/Form/Contribution/Confirm.php index c043716bd0..647cdb7137 100644 --- a/CRM/Contribute/Form/Contribution/Confirm.php +++ b/CRM/Contribute/Form/Contribution/Confirm.php @@ -615,11 +615,7 @@ class CRM_Contribute_Form_Contribution_Confirm extends CRM_Contribute_Form_Contr // Recursively set defaults for nested fields if (isset($contact[$name]) && is_array($contact[$name]) && ($name == 'onbehalf' || $name == 'honor')) { foreach ($contact[$name] as $fieldName => $fieldValue) { - if (is_array($fieldValue) && !in_array($this->_fields[$name][$fieldName]['html_type'], [ - 'Multi-Select', - 'AdvMulti-Select', - ]) - ) { + if (is_array($fieldValue) && $this->_fields[$name][$fieldName]['html_type'] == 'CheckBox') { foreach ($fieldValue as $key => $value) { $defaults["{$name}[{$fieldName}][{$key}]"] = $value; } -- 2.25.1