mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
* 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