diff --git a/src/Support/helpers.php b/src/Support/helpers.php index 9a697b4..43d4674 100644 --- a/src/Support/helpers.php +++ b/src/Support/helpers.php @@ -121,29 +121,6 @@ function array_trim_recursive($values, $charlist = " \t\n\r\0\x0B") } } -if (! function_exists('array_filter_recursive')) { - /** - * Recursively filter empty strings and null elements of the given array. - * - * @param array $values - * @param bool $strOnly - * - * @return mixed - */ - function array_filter_recursive($values, $strOnly = true) - { - foreach ($values as &$value) { - if (is_array($value)) { - $value = array_filter_recursive($value); - } - } - - return ! $strOnly ? array_filter($values) : array_filter($values, function ($item) { - return ! is_null($item) && ! ((is_string($item) || is_array($item)) && empty($item)); - }); - } -} - if (! function_exists('array_diff_assoc_recursive')) { /** * Computes the recursive difference of arrays with additional index check.