From 18c3f1187feb184fe4e651e02d042ad84c4eb9e0 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Wed, 18 Feb 2026 11:33:03 +0100 Subject: [PATCH] reporting: adapt config_read_array() in rrd_import() Note to self: can find more of these using % git grep 'foreach..$config\[' --- src/etc/inc/rrd.inc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/etc/inc/rrd.inc b/src/etc/inc/rrd.inc index 5f34c35af9..fe5637faf4 100644 --- a/src/etc/inc/rrd.inc +++ b/src/etc/inc/rrd.inc @@ -49,9 +49,7 @@ function rrd_export() function rrd_import() { - global $config; - - foreach ($config['rrddata']['rrddatafile'] as $rrd) { + foreach (config_read_array('rrddata', 'rrddatafile', false) as $rrd) { $rrd_file = "/var/db/rrd/" . basename($rrd['filename']); if (!empty($rrd['xmldata'])) { $xml_file = preg_replace('/\.rrd$/', ".xml", $rrd_file);