$dataType = self::getOptionGroupDataType($self->_gName);
if ($dataType && $self->_gName !== 'activity_type') {
$validate = CRM_Utils_Type::validate($fields['value'], $dataType, FALSE);
- if (!$validate) {
+ if ($validate === FALSE) {
CRM_Core_Session::setStatus(
ts('Data Type of the value field for this option value does not match ' . $dataType),
ts('Value field Data Type mismatch'));
}
$params['option_group_id'] = $optionGroupID;
- if (($action & CRM_Core_Action::ADD) && empty($params['value'])) {
+ if (($action & CRM_Core_Action::ADD) && !isset($params['value'])) {
$fieldValues = array('option_group_id' => $optionGroupID);
// use the next available value
/* CONVERT(value, DECIMAL) is used to convert varchar