diff --git a/html/includes/graphs/graph.inc.php b/html/includes/graphs/graph.inc.php index 5ea8d6c5c..dcaae7233 100644 --- a/html/includes/graphs/graph.inc.php +++ b/html/includes/graphs/graph.inc.php @@ -144,11 +144,14 @@ if ($error_msg) { if ($config['rrdcached']) { $rrd_switches = " --daemon ".$config['rrdcached'] . " "; } rrdtool_graph($graphfile, " $rrd_options"); if ($debug) { echo("
".$rrd_cmd."
"); } - if (is_file($graphfile) && !$debug) + if (is_file($graphfile)) { - header('Content-type: image/png'); - $fd = fopen($graphfile,'r');fpassthru($fd);fclose($fd); - unlink($graphfile); + if (!$debug) + { + header('Content-type: image/png'); + $fd = fopen($graphfile,'r');fpassthru($fd);fclose($fd); + unlink($graphfile); + } } else {