1, 'data_type' => array('IS NOT NULL' => 1), 'options' => array('limit' => 0), )); if ($optionGroups['count'] > 0) { foreach ($optionGroups['values'] as $optionGroup) { $values = CRM_Core_BAO_OptionValue::getOptionValuesArray($optionGroup['id']); if (count($values) > 0) { foreach ($values as $value) { $validate = CRM_Utils_Type::validate($value['value'], $optionGroup['data_type'], FALSE); if (!$validate) { $problemValues[] = array( 'group_name' => $optionGroup['title'], 'value_name' => $value['label'], ); } } } } } if (!empty($problemValues)) { $strings = ''; foreach ($problemValues as $problemValue) { $strings .= ts(' "%1" "%2" ', array( 1 => $problemValue['group_name'], 2 => $problemValue['value_name'], )); } $messages[] = new CRM_Utils_Check_Message( __FUNCTION__, ts('The Following Option Values contain value fields that do not match the Data Type of the Option Group

') . $strings . ts('
Option GroupOption Value

'), ts('Option Values with problematic Values'), \Psr\Log\LogLevel::NOTICE, 'fa-server' ); } return $messages; } }