CustomGroup - Use isSerialized function rather than html_type
authorColeman Watts <coleman@civicrm.org>
Fri, 3 Apr 2020 23:57:52 +0000 (19:57 -0400)
committerColeman Watts <coleman@civicrm.org>
Fri, 3 Apr 2020 23:57:52 +0000 (19:57 -0400)
CRM/Core/BAO/CustomGroup.php

index b0d23bbf1910f376144603a416fe375fd8778638..3a9828f0c91cdd031d382cf0c73c03fb731eaaa5 100644 (file)
@@ -1595,9 +1595,7 @@ ORDER BY civicrm_custom_group.weight,
           ) {
             $valid = CRM_Core_BAO_CustomValue::typecheck($field['data_type'], $value);
           }
-          if ($field['html_type'] == 'CheckBox' ||
-            $field['html_type'] == 'Multi-Select'
-          ) {
+          if (CRM_Core_BAO_CustomField::isSerialized($field)) {
             $value = str_replace("|", ",", $value);
             $mulValues = explode(',', $value);
             $customOption = CRM_Core_BAO_CustomOption::getCustomOption($key, TRUE);