From 528a634930fce9876d1158134bfdbb5471b09a4a Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Sun, 27 Oct 2024 21:06:40 +0100 Subject: [PATCH] reporting: isset vs empty on RRD enable The config.xml.sample also has a node and saving RRD by disabling it produces an empty node in the code so isset() is still the right thing to do. PR: https://forum.opnsense.org/index.php?topic=43641.0 --- src/etc/inc/plugins.inc.d/core.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/etc/inc/plugins.inc.d/core.inc b/src/etc/inc/plugins.inc.d/core.inc index 37758699f..d295c2166 100644 --- a/src/etc/inc/plugins.inc.d/core.inc +++ b/src/etc/inc/plugins.inc.d/core.inc @@ -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', '*'