mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Fix printer state error (#12681)
This commit is contained in:
@@ -1624,6 +1624,12 @@ function q_bridge_bits2indices($hex_data)
|
||||
* ie. '9a00' -> '100110100000' -> array(1, 4, 5, 7)
|
||||
*/
|
||||
$hex_data = str_replace(' ', '', $hex_data);
|
||||
|
||||
// we need an even number of digits for hex2bin
|
||||
if (strlen($hex_data) % 2 === 1) {
|
||||
$hex_data = '0' . $hex_data;
|
||||
}
|
||||
|
||||
$value = hex2bin($hex_data);
|
||||
$length = strlen($value);
|
||||
$indices = [];
|
||||
|
||||
Reference in New Issue
Block a user