Skip to content
This repository was archived by the owner on Jan 30, 2020. It is now read-only.

Commit 93e2f27

Browse files
committed
Fix patch for conflict assoc. name and config. name
1 parent 07a96ae commit 93e2f27

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/Factory.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,9 +343,12 @@ public function createInputFilter($inputFilterSpecification)
343343
// Patch to enable nested, integer indexed input_filter_specs
344344
// InputFilter doesn't have an name property!
345345
// But if the key is an integer and type and name are specified maybe we could use it.
346-
if (is_integer($key) && isset($value['type']) && is_string($value['type'])) {
346+
if (isset($value['type']) && is_string($value['type'])) {
347347
if (isset($value['name']) && is_string($value['name'])) {
348-
$key = $value['name'];
348+
if (is_integer($key)) {
349+
$key = $value['name'];
350+
}
351+
// Remove
349352
unset($value['name']);
350353
}
351354
}

0 commit comments

Comments
 (0)