Skip to content

Commit f8d530e

Browse files
committed
Fix non-assoc array normalization
1 parent d54a476 commit f8d530e

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/ArrayConfig.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -157,15 +157,11 @@ private function normalizeConfig(array $config): array
157157
$delimitersPattern = '/[' . preg_quote($delimiterChars, '/') . ']/';
158158

159159
foreach ($config as $key => $value) {
160-
if (\is_array($value)) {
161-
if (!Util::isAssoc($value)) {
162-
continue;
163-
}
164-
160+
if (\is_array($value) && Util::isAssoc($value)) {
165161
$value = $this->normalizeConfig($value);
166162
}
167163

168-
if (false === strpbrk($key, $delimiterChars)) {
164+
if (!\is_string($key) || false === strpbrk($key, $delimiterChars)) {
169165
$normalized[$key] = $value;
170166

171167
continue;

0 commit comments

Comments
 (0)