Files
librenms-librenms/tests
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
..
2023-05-24 22:21:54 +02:00
2023-07-26 01:08:10 +02:00
2023-05-24 22:21:54 +02:00
2023-06-13 13:35:00 +02:00
2023-05-24 22:21:54 +02:00
2023-05-24 22:21:54 +02:00
2023-05-24 22:21:54 +02:00
2023-04-17 06:51:35 -05:00
2023-05-24 22:21:54 +02:00
2023-05-24 22:21:54 +02:00
2022-11-05 14:43:54 -05:00
2023-05-24 22:21:54 +02:00
2023-05-24 22:21:54 +02:00
2023-05-24 22:21:54 +02:00
2023-05-24 22:21:54 +02:00
2023-05-24 22:21:54 +02:00
2023-05-24 22:21:54 +02:00
2023-05-24 22:21:54 +02:00
2023-05-24 22:21:54 +02:00
2023-05-24 22:21:54 +02:00
2023-05-24 22:21:54 +02:00
2023-05-24 22:21:54 +02:00
2023-05-24 22:21:54 +02:00