From 4694a0c7793a4cbb25bab32bb65475d768613695 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Tue, 5 Oct 2021 10:48:26 -0400 Subject: [PATCH] REF - Remove non-functional code from APIv3 --- api/v3/utils.php | 9 --------- 1 file changed, 9 deletions(-) diff --git a/api/v3/utils.php b/api/v3/utils.php index 2595d3d262..9415938513 100644 --- a/api/v3/utils.php +++ b/api/v3/utils.php @@ -2304,11 +2304,8 @@ function _civicrm_api3_api_match_pseudoconstant(&$fieldValue, $entity, $fieldNam $options = CRM_Utils_Array::value('values', $options, []); } - // If passed a value-separated string, explode to an array, then re-implode after matching values. - $implode = FALSE; if (is_string($fieldValue) && strpos($fieldValue, CRM_Core_DAO::VALUE_SEPARATOR) !== FALSE) { $fieldValue = CRM_Utils_Array::explodePadded($fieldValue); - $implode = TRUE; } // If passed multiple options, validate each. if (is_array($fieldValue)) { @@ -2317,12 +2314,6 @@ function _civicrm_api3_api_match_pseudoconstant(&$fieldValue, $entity, $fieldNam _civicrm_api3_api_match_pseudoconstant_value($value, $options, $fieldName, CRM_Utils_Array::value('api.required', $fieldInfo)); } } - // TODO: unwrap the call to implodePadded from the conditional and do it always - // need to verify that this is safe and doesn't break anything though. - // Better yet would be to leave it as an array and ensure that every dao/bao can handle array input - if ($implode) { - CRM_Utils_Array::implodePadded($fieldValue); - } } else { _civicrm_api3_api_match_pseudoconstant_value($fieldValue, $options, $fieldName, CRM_Utils_Array::value('api.required', $fieldInfo)); -- 2.25.1