reporting: isset vs empty on RRD enable

The config.xml.sample also has a <enable/> node and saving RRD by
disabling it produces an empty <rrd/> node in the code so isset()
is still the right thing to do.

PR: https://forum.opnsense.org/index.php?topic=43641.0
This commit is contained in:
Franco Fichtner 2024-10-27 21:06:40 +01:00
parent 51492f629b
commit 528a634930

View File

@ -298,7 +298,7 @@ function core_cron()
/**
* rrd graph collector, only schedule execution when enabled
*/
if (!empty($config['rrd']['enable'])) {
if (isset($config['rrd']['enable'])) {
$jobs[]['autocron'] = [
'/usr/local/bin/flock -n -E 0 -o /tmp/updaterrd.lock /usr/local/opnsense/scripts/health/updaterrd.php',
'*'