Issues (2963)

includes/polling/os/ptp600.inc.php (1 issue)

Labels
Severity
1
<?php
2
/*
3
 * LibreNMS
4
 *
5
 * ptp600.inc.php
6
 *
7
 * This program is free software: you can redistribute it and/or modify
8
 * it under the terms of the GNU General Public License as published by
9
 * the Free Software Foundation, either version 3 of the License, or
10
 * (at your option) any later version.
11
 *
12
 * This program is distributed in the hope that it will be useful,
13
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
15
 * GNU General Public License for more details.
16
 *
17
 * You should have received a copy of the GNU General Public License
18
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
19
 *
20
 * @package    LibreNMS
21
 * @link       https://www.librenms.org
22
 * @copyright  2017 Paul Heinrichs
23
 * @author     Paul Heinrichs<[email protected]>
24
 */
25
26
$version = $device['sysDescr'];
27
$masterSlaveMode = ucfirst(snmp_get($device, 'masterSlaveMode.0', '-Oqv', 'CANOPY-SYS-MIB'));
0 ignored issues
show
It seems like snmp_get($device, 'maste...Oqv', 'CANOPY-SYS-MIB') can also be of type false; however, parameter $string of ucfirst() does only seem to accept string, maybe add an additional type check? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

27
$masterSlaveMode = ucfirst(/** @scrutinizer ignore-type */ snmp_get($device, 'masterSlaveMode.0', '-Oqv', 'CANOPY-SYS-MIB'));
Loading history...
28
$hardware = 'PTP 600 ' . $masterSlaveMode;
29