Skip to content

Commit f5978d9

Browse files
committed
compatibility
1 parent c8bfed8 commit f5978d9

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/Templates/Validator/ComposedItem.phptpl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@
6666

6767
{% if generatorConfiguration.collectErrors() %}
6868
$compositionErrorCollection[] = $this->_errorRegistry;
69-
isset($validatorIndex) ? $this->_propertyValidationState[$validatorIndex][$validatorComponentIndex] = $this->_errorRegistry : null;
69+
if (isset($validatorIndex)) {
70+
$this->_propertyValidationState[$validatorIndex][$validatorComponentIndex] = $this->_errorRegistry;
71+
}
7072

7173
// an error inside the composed validation occurred. Throw an exception to count the validity of the
7274
// composition item

tests/Objects/MultiTypePropertyTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,14 +201,14 @@ public function invalidNestedObjectDataProvider(): array
201201
<<<ERROR
202202
Invalid nested object for property property:
203203
- Invalid type for name. Requires string, got integer
204-
ERROR,
204+
ERROR
205205
],
206206
'invalid additional property' => [
207207
['name' => 'Hans', 'age' => 42],
208208
<<<ERROR
209209
Invalid nested object for property property:
210210
- Provided JSON for MultiTypePropertyTest_\w+ contains not allowed additional properties \[age\]
211-
ERROR,
211+
ERROR
212212
],
213213
];
214214
}

0 commit comments

Comments
 (0)