Skip to content

Commit 1e1962d

Browse files
authored
Quick fix for iftype page (librenms#18039)
1 parent bc9ab0a commit 1e1962d

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

includes/html/pages/iftype.inc.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@
44
$types_array = explode(',', strip_tags($vars['type']));
55
$ports = get_ports_from_type($types_array);
66

7-
foreach ($ports as $port) {
8-
$if_list[] = $port['port_id'];
9-
}
10-
$if_list = implode(',', $if_list);
7+
$if_list = implode(',', array_map(fn ($port) => $port['port_id'], $ports));
118

129
// show title from config file (but ucwords it)
1310
$ctypes = collect(\App\Facades\LibrenmsConfig::get('custom_descr', []))->keyBy(function ($descr) {

0 commit comments

Comments
 (0)