Cacti / plugin_mikrotik

Mikrotik Plugin for Cacti
GNU General Public License v2.0
60 stars 24 forks source link

PHP DEPRECATED warnings in mikrotik plugin #62

Closed loloski closed 2 years ago

loloski commented 2 years ago

This deprecation notice is annoying on PHP 8.1.2, the fix is to type cast the function to int

/* see if its time to run */
$last_run  = (int) read_config_option('mikrotik_automation_lastrun');
$frequency = (int) read_config_option('mikrotik_automation_frequency') * 60;
debug("Last Run Was '" . date('Y-m-d H:i:s', $last_run) . "', Frequency is '" . ($frequency/60) . "' Minutes");
TheWitness commented 2 years ago

Can you do a pull request?

TheWitness commented 2 years ago

Okay, I fixed it.