mirror of
https://github.com/librenms/librenms.git
synced 2024-09-22 19:08:15 +00:00
Merge pull request #2894 from laf/php53-fix
Fixed code to run with php 5.3
This commit is contained in:
commit
8a614c852a
@ -1196,12 +1196,12 @@ function get_port_assoc_mode_name ($port_assoc_mode_id, $no_cache = false) {
|
||||
* @return array
|
||||
*/
|
||||
function get_ports_mapped ($device_id, $with_statistics = false) {
|
||||
$ports = [];
|
||||
$maps = [
|
||||
'ifIndex' => [],
|
||||
'ifName' => [],
|
||||
'ifDescr' => [],
|
||||
];
|
||||
$ports = array();
|
||||
$maps = (
|
||||
'ifIndex' => array(),
|
||||
'ifName' => array(),
|
||||
'ifDescr' => array(),
|
||||
);
|
||||
|
||||
/* Query all information available for ports for this device ... */
|
||||
$query = 'SELECT * FROM `ports` WHERE `device_id` = ? ORDER BY port_id';
|
||||
@ -1222,10 +1222,10 @@ function get_ports_mapped ($device_id, $with_statistics = false) {
|
||||
$maps['ifDescr'][$port['ifDescr']] = $port['port_id'];
|
||||
}
|
||||
|
||||
return [
|
||||
return array(
|
||||
'ports' => $ports,
|
||||
'maps' => $maps,
|
||||
];
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user