Skip to content

Commit 7d9a444

Browse files
authored
Update PatternProperties.phptpl
force key of the pattern property to be casted to a string, as for numeric-only pattern properties combined with PHP as a data source (eg. Builder) the keys might be int values
1 parent d4a00ea commit 7d9a444

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Templates/Validator/PatternProperties.phptpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
foreach ($properties as $propertyKey => $value) {
99
try {
10-
if (!preg_match(base64_decode('{{ pattern }}'), $propertyKey)) {
10+
if (!preg_match(base64_decode('{{ pattern }}'), (string) $propertyKey)) {
1111
continue;
1212
}
1313

@@ -47,4 +47,4 @@
4747
}
4848

4949
return !empty($invalidProperties);
50-
})()
50+
})()

0 commit comments

Comments
 (0)