mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Fix ArubaInstance channel decode issue (#14732)
* Fix ArubaInstance channel decode issue PHP no longer implicitly casts in this situation * missing import
This commit is contained in:
@@ -41,6 +41,7 @@ use LibreNMS\Interfaces\Polling\Sensors\WirelessApCountPolling;
|
||||
use LibreNMS\Interfaces\Polling\Sensors\WirelessClientsPolling;
|
||||
use LibreNMS\Interfaces\Polling\Sensors\WirelessFrequencyPolling;
|
||||
use LibreNMS\OS;
|
||||
use LibreNMS\Util\Number;
|
||||
use LibreNMS\Util\Rewrite;
|
||||
|
||||
class ArubaInstant extends OS implements
|
||||
@@ -265,7 +266,7 @@ class ArubaInstant extends OS implements
|
||||
protected function decodeChannel($channel): int
|
||||
{
|
||||
// Trim off everything not a digit, like channel "116e"
|
||||
$channel = preg_replace("/\D/", '', $channel);
|
||||
$channel = Number::cast(preg_replace("/\D/", '', $channel));
|
||||
|
||||
return $channel & 255; // mask off the channel width information
|
||||
}
|
||||
|
Reference in New Issue
Block a user