Skip to content

Commit bf90235

Browse files
committed
🔥 remove duplicate remove_empty_elements() function
Signed-off-by: otengkwame <[email protected]>
1 parent 837e56a commit bf90235

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

Core/helpers/webby_helper.php

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1120,22 +1120,6 @@ function remove_from_array(
11201120
}
11211121
}
11221122

1123-
if ( ! function_exists('remove_empty_elements'))
1124-
{
1125-
/**
1126-
* Remove keys and values
1127-
* that are empty
1128-
*
1129-
* @param array $array
1130-
* @return array
1131-
*/
1132-
function remove_empty_elements($array)
1133-
{
1134-
$array = array_map('array_filter', $array);
1135-
return $array = array_filter($array);
1136-
}
1137-
}
1138-
11391123
if ( ! function_exists('remove_with_value'))
11401124
{
11411125
/**
@@ -1202,7 +1186,7 @@ function arrayfy($object)
12021186
$json = json_encode($object);
12031187
return json_decode($json, true);
12041188
}
1205-
1189+
12061190
if (is_array($object)) {
12071191
return $object;
12081192
}

0 commit comments

Comments
 (0)