projects
/
php-utility-classes.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
446499b
)
add some data fetched from RRD; make RRD fetch actually return data correctly
author
Robert Kaiser
<kairo@kairo.at>
Thu, 23 Jun 2016 13:48:38 +0000
(15:48 +0200)
committer
Robert Kaiser
<kairo@kairo.at>
Thu, 23 Jun 2016 13:48:38 +0000
(15:48 +0200)
include/classes/rrdstat.php-class
patch
|
blob
|
blame
|
history
diff --git
a/include/classes/rrdstat.php-class
b/include/classes/rrdstat.php-class
index deb8cdaef81250a998a00f18cbc6c1391c5854b0..7ac9c04973b6b536e7c7fd228c2c4fbe431aa236 100644
(file)
--- 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);