From 49e59d6c849e41d76847ebdaf7de2b2bcd60d3e9 Mon Sep 17 00:00:00 2001 From: Paragon Initiative Enterprises Date: Sat, 11 May 2024 18:03:46 -0400 Subject: [PATCH] Fix test failures --- src/InputFilterContainer.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/InputFilterContainer.php b/src/InputFilterContainer.php index fa8bdba..f2a358c 100644 --- a/src/InputFilterContainer.php +++ b/src/InputFilterContainer.php @@ -84,16 +84,17 @@ public function filterValue(string $key, $multiDimensional) $var = '$multiDimensional'; foreach ($pieces as $piece) { $_var = substr($var, 1); - if (is_null(${$_var})) { - ${$var} = []; + if (empty(${$_var})) { + ${$_var} = []; } + ksort(${$_var}); $append = '[' . self::sanitize($piece) . ']'; if (!isset(${$var . $append})) { ${$var . $append} = null; $var .= $append; - break; + continue; } // Alphabetize the parent array if (is_array(${$var})) {