Skip to content

Commit 91f5891

Browse files
committed
Resolve property definition subschemas before checking for a default
1 parent 0bcf3eb commit 91f5891

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/JsonSchema/Constraints/UndefinedConstraint.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@ protected function applyDefaultValues(&$value, $schema, $path)
241241
if (isset($schema->properties) && LooseTypeCheck::isObject($value)) {
242242
// $value is an object or assoc array, and properties are defined - treat as an object
243243
foreach ($schema->properties as $currentProperty => $propertyDefinition) {
244+
$propertyDefinition = $this->factory->getSchemaStorage()->resolveRefSchema($propertyDefinition);
244245
if (
245246
!LooseTypeCheck::propertyExists($value, $currentProperty)
246247
&& property_exists($propertyDefinition, 'default')

0 commit comments

Comments
 (0)