From 6f3c580520a92e646f1fc95b9d893c2bb4509e4f Mon Sep 17 00:00:00 2001 From: Robert Kaiser Date: Thu, 23 Jun 2016 15:48:38 +0200 Subject: [PATCH] add some data fetched from RRD; make RRD fetch actually return data correctly --- include/classes/rrdstat.php-class | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/classes/rrdstat.php-class b/include/classes/rrdstat.php-class index deb8cda..7ac9c04 100644 --- a/include/classes/rrdstat.php-class +++ b/include/classes/rrdstat.php-class @@ -456,8 +456,8 @@ class rrdstat { $fresult = array(); $rows = explode("\n", $return); $fields = preg_split('/\s+/', array_shift($rows)); - if (array_shift($fields) == 'timestamp') { - $fresult[0] = $fields; + if (in_array(array_shift($fields), array('timestamp', ''))) { + //$fresult[0] = $fields; foreach ($rows as $row) { if (strlen(trim($row))) { $rvals = preg_split('/\s+/', $row); -- 2.43.0