Skip to content

Commit bf19989

Browse files
committed
Merge pull request jsonrainbow#22 from paranoiq/master
wrong handling of "required": false (closes jsonrainbow#21)
2 parents 5aac95c + 785b93e commit bf19989

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/JsonSchema/Constraints/Object.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ class Object extends Constraint
2222
*/
2323
function check($element, $definition = null, $path = null, $additionalProp = null, $patternProperties = null)
2424
{
25+
if ($element instanceof Undefined) {
26+
return;
27+
}
28+
2529
if ($patternProperties) {
2630
$this->validatePatternProperties($element, $path, $additionalProp, $patternProperties);
2731
}

0 commit comments

Comments
 (0)