[ParameterValidator] Handle missing parameter type (#1057)

* [ParameterValidator] Handle missing parameter type
This commit is contained in:
Roliga 2019-04-04 22:55:46 +02:00 committed by Teromene
parent 50c90eb5df
commit 380fdf2e40

View file

@ -195,16 +195,14 @@ class ParameterValidator {
foreach($set as $id => $properties) {
if(isset($data[$id]) && !empty($data[$id])) {
$queriedContexts[$context] = true;
} elseif(isset($properties['required'])
&& $properties['required'] === true
&& isset($properties['type'])
&& $properties['type'] !== 'checkbox'
&& $properties['type'] !== 'list') {
} elseif (isset($properties['type'])
&& ($properties['type'] === 'checkbox' || $properties['type'] === 'list')) {
continue;
} elseif(isset($properties['required']) && $properties['required'] === true) {
$queriedContexts[$context] = false;
break;
}
}
}
// Abort if one of the globally required parameters is not satisfied