Skip to content

Commit

Permalink
Refs #41997, Fix type check for customValue to handle non-array input…
Browse files Browse the repository at this point in the history
… in CheckBox field.
  • Loading branch information
apple843119 committed Nov 12, 2024
1 parent d16f1cc commit 0c37392
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CRM/Core/BAO/CustomGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -1261,7 +1261,7 @@ static function postProcess(&$groupTree, &$params, $skipFile = FALSE) {

case 'CheckBox':
if (!empty($v)) {
$customValue = array_keys($v);
$customValue = is_array($v) ? array_keys($v) : [];
$groupTree[$groupID]['fields'][$fieldId]['customValue']['data'] = CRM_Core_DAO::VALUE_SEPARATOR . CRM_Utils_Array::implode(CRM_Core_DAO::VALUE_SEPARATOR, $customValue) . CRM_Core_DAO::VALUE_SEPARATOR;
}
else {
Expand Down

0 comments on commit 0c37392

Please sign in to comment.