From 81b4fbf22158428bccf9d3315d49654215afd9f8 Mon Sep 17 00:00:00 2001 From: f0o Date: Fri, 2 Oct 2015 02:00:28 +0000 Subject: [PATCH] Fixes #2037 --- includes/rrdtool.inc.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/includes/rrdtool.inc.php b/includes/rrdtool.inc.php index 1c12f7e399..b846d060ef 100644 --- a/includes/rrdtool.inc.php +++ b/includes/rrdtool.inc.php @@ -191,7 +191,7 @@ function rrdtool($command, $filename, $options) { print $console_color->convert('RRD[%g'.$cmd.'%n] '); } else { - $tmp = stream_get_contents($rrd_pipes[1]).stream_get_contents($rrd_pipes[2]); + return array(stream_get_contents($rrd_pipes[1]),stream_get_contents($rrd_pipes[2])); } } @@ -206,6 +206,12 @@ function rrdtool($command, $filename, $options) { function rrdtool_create($filename, $options) { + if( $config['rrdcached'] && $config['rrdtool_version'] >= 1.5 ) { + $chk = rrdtool('info', $filename); + if (!empty($chk[0])) { + return true; + } + } return rrdtool('create', $filename, str_replace(array("\r", "\n"), '', $options)); }