Skip to content
Snippets Groups Projects
Commit f6a7c1af authored by jaapjansma's avatar jaapjansma
Browse files

fixed issue with normalizing and denormalizing boolean values

parent 64fe3117
No related branches found
No related tags found
No related merge requests found
...@@ -60,9 +60,28 @@ ...@@ -60,9 +60,28 @@
case \CRM_Utils_Type::T_MONEY: case \CRM_Utils_Type::T_MONEY:
return (float) $value; return (float) $value;
break; break;
case \CRM_Utils_Type::T_BOOLEAN:
return $value ? true : false;
break;
} }
return $value; return $value;
} }
/**
* Normalize the input value.
*
* @param $value
*
* @return mixed
*/
public function normalizeValue($value) {
switch ($this->getCrmType()) {
case \CRM_Utils_Type::T_BOOLEAN:
$value = $value ? true : false;
break;
}
return parent::normalizeValue($value); // TODO: Change the autogenerated stub
}
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment