@@ -103,10 +103,10 @@ public function validateElement($element, $matches, $objectDefinition = null, $p
103
103
$ this ->addError ($ path , "The presence of the property " . $ i . " requires that " . $ require . " also be present " , 'requires ' );
104
104
}
105
105
106
- if (!$ definition ) {
106
+ // if (!$definition) {
107
107
// normal property verification
108
- $ this ->checkUndefined ($ value , new \stdClass (), $ path , $ i );
109
- }
108
+ // $this->checkUndefined($value, new \stdClass(), $path, $i);
109
+ // }
110
110
111
111
$ property = $ this ->getProperty ($ element , $ i , new UndefinedConstraint ());
112
112
if (is_object ($ property )) {
@@ -127,7 +127,11 @@ public function validateDefinition($element, $objectDefinition = null, $path = n
127
127
foreach ($ objectDefinition as $ i => $ value ) {
128
128
$ property = $ this ->getProperty ($ element , $ i , new UndefinedConstraint ());
129
129
$ definition = $ this ->getProperty ($ objectDefinition , $ i );
130
- $ this ->checkUndefined ($ property , $ definition , $ path , $ i );
130
+
131
+ if (is_object ($ definition )) {
132
+ // Undefined constraint will check for is_object() and quit if is not - so why pass it?
133
+ $ this ->checkUndefined ($ property , $ definition , $ path , $ i );
134
+ }
131
135
}
132
136
}
133
137
0 commit comments