From f2a4593558b3a3ec696e9cc1de93fa898b9521bb Mon Sep 17 00:00:00 2001 From: Pim van den Berg Date: Mon, 7 Oct 2013 21:56:41 +0200 Subject: type: fix undefined index in ds_names[$source] before empty check --- type/Uptime.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'type/Uptime.class.php') diff --git a/type/Uptime.class.php b/type/Uptime.class.php index 4ada117..6e08b0b 100644 --- a/type/Uptime.class.php +++ b/type/Uptime.class.php @@ -41,7 +41,7 @@ class Type_Uptime extends Type_Default { $c = 0; foreach ($sources as $source) { - $dsname = empty($this->ds_names[$source]) ? $source : $this->ds_names[$source]; + $dsname = (isset($this->ds_names[$source]) && !empty($this->ds_names[$source])) ? $this->ds_names[$source] : $source; $color = is_array($this->colors) ? (isset($this->colors[$source])?$this->colors[$source]:$this->colors[$c++]) : $this->colors; //current value -- cgit v1.1