From f275445ef31d40c7cfdbe2cf3767c9c6051ec057 Mon Sep 17 00:00:00 2001 From: Pim van den Berg Date: Wed, 3 Jul 2013 22:47:39 +0200 Subject: type/default: dont include y-axis description (-v option) when not set It caused an "Unknown argument: undefined" error when using canvas. --- type/Default.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'type') diff --git a/type/Default.class.php b/type/Default.class.php index 8632328..416a352 100644 --- a/type/Default.class.php +++ b/type/Default.class.php @@ -219,7 +219,8 @@ class Type_Default { $rrdgraph[] = sprintf('-h %d', is_numeric($this->heigth) ? $this->heigth : 175); $rrdgraph[] = '-l 0'; $rrdgraph[] = sprintf('-t "%s on %s"', $this->rrd_title, $this->args['host']); - $rrdgraph[] = sprintf('-v "%s"', $this->rrd_vertical); + if ($this->rrd_vertical) + $rrdgraph[] = sprintf('-v "%s"', $this->rrd_vertical); $rrdgraph[] = sprintf('-s e-%d', is_numeric($this->seconds) ? $this->seconds : 86400); return $rrdgraph; -- cgit v1.1