add some data fetched from RRD; make RRD fetch actually return data correctly
authorRobert Kaiser <kairo@kairo.at>
Thu, 23 Jun 2016 13:48:38 +0000 (15:48 +0200)
committerRobert Kaiser <kairo@kairo.at>
Thu, 23 Jun 2016 13:48:38 +0000 (15:48 +0200)
include/classes/rrdstat.php-class

index deb8cda..7ac9c04 100644 (file)
@@ -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);