Issues (2963)

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

1
<?php
2
/*
3
 * LibreNMS
4
 *
5
 * Copyright (c) 2017 Søren Friis Rosiak <[email protected]>
6
 * This program is free software: you can redistribute it and/or modify it
7
 * under the terms of the GNU General Public License as published by the
8
 * Free Software Foundation, either version 3 of the License, or (at your
9
 * option) any later version.  Please see LICENSE.txt at the top level of
10
 * the source code distribution for details.
11
 */
12
13
$explodeddata = explode('Halon ', $device['sysDescr']);
14
$version = $explodeddata['1'];
15
$serial = trim(snmp_get($device, 'HALON-SP-MIB::serialNumber.0', '-OQv'), '"');
0 ignored issues
show
It seems like snmp_get($device, 'HALON...erialNumber.0', '-OQv') can also be of type false; however, parameter $string of trim() 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

15
$serial = trim(/** @scrutinizer ignore-type */ snmp_get($device, 'HALON-SP-MIB::serialNumber.0', '-OQv'), '"');
Loading history...
16