From f30bbf8be225743711d7b161b59b8fb0c310ab22 Mon Sep 17 00:00:00 2001 From: Pim van den Berg Date: Fri, 21 Dec 2012 19:08:57 +0100 Subject: type: resolve undefined variable $c and $raw notices Reported-by: Philipp Hellmich --- type/Default.class.php | 1 + type/GenericIO.class.php | 1 + type/GenericStacked.class.php | 4 +--- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'type') diff --git a/type/Default.class.php b/type/Default.class.php index 13e45c9..26189c7 100644 --- a/type/Default.class.php +++ b/type/Default.class.php @@ -35,6 +35,7 @@ class Type_Default { } function rainbow_colors() { + $c = 0; $sources = count($this->rrd_get_sources()); foreach ($this->rrd_get_sources() as $ds) { # hue (saturnation=1, value=1) diff --git a/type/GenericIO.class.php b/type/GenericIO.class.php index bbbbea7..42314fd 100644 --- a/type/GenericIO.class.php +++ b/type/GenericIO.class.php @@ -9,6 +9,7 @@ class Type_GenericIO extends Type_Default { $sources = $this->rrd_get_sources(); + $raw = null; if ($this->scale) $raw = '_raw'; $i=0; diff --git a/type/GenericStacked.class.php b/type/GenericStacked.class.php index a0ae4c5..7c65ddd 100644 --- a/type/GenericStacked.class.php +++ b/type/GenericStacked.class.php @@ -9,11 +9,9 @@ class Type_GenericStacked extends Type_Default { $sources = $this->rrd_get_sources(); + $raw = null; if ($this->scale) $raw = '_raw'; - else - $raw = null; - $i=0; foreach ($this->tinstances as $tinstance) { foreach ($this->data_sources as $ds) { -- cgit v1.1