Commit 2c099ed8 authored by jaapjansma's avatar jaapjansma

Fixed issues from refactoring.

parent 7f403ebc
......@@ -132,7 +132,7 @@ class CreateOrUpdateParticipant extends AbstractAction {
if (stripos($spec->getName(), 'custom_')!==0) {
continue;
}
if ($parameters->getParameter($spec->getName())) {
if ($parameters->doesParameterExists($spec->getName())) {
$participantParams[$spec->getApiFieldName()] = $parameters->getParameter($spec->getName());
}
}
......
......@@ -21,7 +21,7 @@ class ParameterBag implements ParameterBagInterface, \IteratorAggregate {
* Tests whether the parameter with the name exists.
*/
public function doesParameterExists($name) {
if (isset($this->parameters[$name]) && $this->parameters[$name] != null) {
if (isset($this->parameters[$name])) {
return true;
}
return false;
......
......@@ -26,7 +26,7 @@ class SpecificationBag implements \IteratorAggregate {
return false;
} if($parameters->doesParameterExists($spec->getName())) {
$value = $parameters->getParameter($spec->getName());
if (!\CRM_Utils_Type::validate($value, $spec->getDataType(), false)) {
if ($value && !\CRM_Utils_Type::validate($value, $spec->getDataType(), false)) {
return false;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment