Skip to content

Commit e20ec47

Browse files
authored
Rector up to PHP 7.3 (librenms#18436)
1 parent bb569fa commit e20ec47

15 files changed

+56
-60
lines changed

app/Models/Device.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,7 @@ public static function findByIp(?string $ip): ?Device
145145
if ($port) {
146146
return $port->device;
147147
}
148-
} catch (InvalidIpException $e) {
149-
//
150-
} catch (ModelNotFoundException $e) {
148+
} catch (InvalidIpException|ModelNotFoundException $e) {
151149
//
152150
}
153151

@@ -159,9 +157,7 @@ public static function findByIp(?string $ip): ?Device
159157
if ($port) {
160158
return $port->device;
161159
}
162-
} catch (InvalidIpException $e) {
163-
//
164-
} catch (ModelNotFoundException $e) {
160+
} catch (InvalidIpException|ModelNotFoundException $e) {
165161
//
166162
}
167163

includes/html/graphs/device/bigip_ltm_allpm_bytesin.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
if ($comp['type'] != 'f5-ltm-poolmember') {
4747
continue;
4848
}
49-
if (! strstr($comp['UID'], $parent)) {
49+
if (! strstr($comp['UID'], (string) $parent)) {
5050
continue;
5151
}
5252

includes/html/graphs/device/bigip_ltm_allpm_bytesout.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
if ($comp['type'] != 'f5-ltm-poolmember') {
4747
continue;
4848
}
49-
if (! strstr($comp['UID'], $parent)) {
49+
if (! strstr($comp['UID'], (string) $parent)) {
5050
continue;
5151
}
5252

includes/html/graphs/device/bigip_ltm_allpm_conns.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
if ($comp['type'] != 'f5-ltm-poolmember') {
4747
continue;
4848
}
49-
if (! strstr($comp['UID'], $parent)) {
49+
if (! strstr($comp['UID'], (string) $parent)) {
5050
continue;
5151
}
5252

includes/html/graphs/device/bigip_ltm_allpm_currconns.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
if ($comp['type'] != 'f5-ltm-poolmember') {
4747
continue;
4848
}
49-
if (! strstr($comp['UID'], $parent)) {
49+
if (! strstr($comp['UID'], (string) $parent)) {
5050
continue;
5151
}
5252

includes/html/graphs/device/bigip_ltm_allpm_pktsin.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
if ($comp['type'] != 'f5-ltm-poolmember') {
4747
continue;
4848
}
49-
if (! strstr($comp['UID'], $parent)) {
49+
if (! strstr($comp['UID'], (string) $parent)) {
5050
continue;
5151
}
5252

includes/html/graphs/device/bigip_ltm_allpm_pktsout.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
if ($comp['type'] != 'f5-ltm-poolmember') {
4747
continue;
4848
}
49-
if (! strstr($comp['UID'], $parent)) {
49+
if (! strstr($comp['UID'], (string) $parent)) {
5050
continue;
5151
}
5252

includes/html/pages/device/edit/ipmi.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
del_dev_attrib($device, 'ipmi_hostname');
1717
}
1818

19-
if ($ipmi_port != '') {
19+
if ($ipmi_port != 0) {
2020
set_dev_attrib($device, 'ipmi_port', $ipmi_port);
2121
} else {
2222
set_dev_attrib($device, 'ipmi_port', '623'); // Default port

includes/html/pages/device/loadbalancer/ltm_pool_details.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
if ($comp['type'] != 'f5-ltm-poolmember') {
8484
continue;
8585
}
86-
if (! strstr($comp['UID'], $parent)) {
86+
if (! strstr($comp['UID'], (string) $parent)) {
8787
continue;
8888
}
8989

includes/html/pages/device/loadbalancer/ltm_vs_pool.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
if ($comp['type'] != 'f5-ltm-poolmember') {
7676
continue;
7777
}
78-
if (! strstr($comp['UID'], $parent)) {
78+
if (! strstr($comp['UID'], (string) $parent)) {
7979
continue;
8080
}
8181

0 commit comments

Comments
 (0)