Cacti / plugin_thold

Thold Plugin for Cacti
GNU General Public License v2.0
61 stars 60 forks source link

RPN CDEF error handling #619

Closed unka65 closed 10 months ago

unka65 commented 10 months ago

When an RPN expression (|ds:cpu|,1) item is not an expected, numeric value (1), the validation logs a warning "Erroneous CDEF ... should be numeric" but continues to try to use the bad value. A PHP error occurs and disables the plugin. I do not know if that is expected and preferred so to get a notification or if the plugin should continue to function and process other items. This change would exit the function after the validation error, making it a soft error instead, so that the plugin would remain enabled.

TheWitness commented 10 months ago

All the new strict typing in PHP makes me glad you are putting the new version through it's paces. Thanks!