mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Remove empty items from output
This commit is contained in:
parent
8d5ff32b7a
commit
c253e3520b
@ -390,7 +390,7 @@ function get_pkg_info($pkgs = 'all', $remote_repo_usage_disabled = false,
|
||||
"search {$extra_param}-R --raw-format json-compact " .
|
||||
$pkgs, $search_out, $search_err);
|
||||
if ($search_rc == 0) {
|
||||
$search_items = explode("\n", $search_out);
|
||||
$search_items = explode("\n", chop($search_out));
|
||||
array_walk($search_items, function(&$v, &$k) {
|
||||
$v = json_decode($v, true);
|
||||
});
|
||||
@ -408,7 +408,7 @@ function get_pkg_info($pkgs = 'all', $remote_repo_usage_disabled = false,
|
||||
$info_rc = pkg_exec("info -R --raw-format json-compact " .
|
||||
$pkgs, $info_out, $info_err);
|
||||
if ($info_rc == 0) {
|
||||
$info_items = explode("\n", $info_out);
|
||||
$info_items = explode("\n", chop($info_out));
|
||||
array_walk($info_items, function(&$v, &$k) {
|
||||
$v = json_decode($v, true);
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user