diff --git a/LibreNMS/OS/Symbol.php b/LibreNMS/OS/Symbol.php index dd386c7a7c..c685deec52 100644 --- a/LibreNMS/OS/Symbol.php +++ b/LibreNMS/OS/Symbol.php @@ -25,6 +25,7 @@ namespace LibreNMS\OS; +use Illuminate\Support\Str; use LibreNMS\Device\WirelessSensor; use LibreNMS\Interfaces\Discovery\Sensors\WirelessClientsDiscovery; use LibreNMS\OS; @@ -41,7 +42,7 @@ class Symbol extends OS implements WirelessClientsDiscovery { $device = $this->getDevice(); - if (str_i_contains($device['hardware'], 'AP')) { + if (Str::contains(strtolower($device['hardware']), 'ap')) { $oid = '.1.3.6.1.4.1.388.11.2.4.2.100.10.1.18.1'; return array( new WirelessSensor('clients', $device['device_id'], $oid, 'symbol', 1, 'Clients') diff --git a/app/Models/Port.php b/app/Models/Port.php index ddf7eff181..274c514084 100644 --- a/app/Models/Port.php +++ b/app/Models/Port.php @@ -4,7 +4,7 @@ namespace App\Models; use DB; use Illuminate\Database\Eloquent\Builder; -use LibreNMS\Data\Store\Rrd; +use Illuminate\Support\Str; use LibreNMS\Util\Rewrite; use Permissions; @@ -72,7 +72,7 @@ class Port extends DeviceRelatedModel } foreach ((array)\LibreNMS\Config::get('rewrite_if', []) as $src => $val) { - if (str_i_contains($label, $src)) { + if (Str::contains(strtolower($label), strtolower($src))) { $label = $val; } }