Files
librenms-librenms/includes/discovery
fufroma c030b0c00e RFC1628 - Force cast on some values before doing arithmetic (#14613)
* Force cast on some values before doing arithmetic

Some devices (like Delta InsightPower G3 Mini SNMP Card) return STRING instead of numerical value.

A few lines after, when doing a division on it, everything go bad ( / $divisor).

I added force casting, no more crash and the values are OK.

* Using helper cast_number() instead of intval()

* Fix style

* Add test data

* Stop using deprecated function cast_number
2023-07-31 22:18:26 -05:00
..
2022-01-30 16:28:18 -06:00
2023-07-26 01:08:10 +02:00
2023-07-26 01:08:10 +02:00
2021-09-10 20:09:53 +02:00
2020-11-23 15:35:35 -06:00
2021-09-10 20:09:53 +02:00
2021-11-17 19:23:55 -06:00
2022-01-30 16:28:18 -06:00
2023-03-13 22:32:22 +01:00