From: Robert Kaiser Date: Wed, 29 Dec 2021 22:26:17 +0000 (+0100) Subject: make sure the array key exists X-Git-Url: https://git-public.kairo.at//?a=commitdiff_plain;h=e67037744edbb115b88b23f3ab6926f77244ca9f;p=php-utility-classes.git make sure the array key exists --- diff --git a/classes/rrdstat.php-class b/classes/rrdstat.php-class index 1ed4504..9743e7a 100644 --- a/classes/rrdstat.php-class +++ b/classes/rrdstat.php-class @@ -496,7 +496,7 @@ class rrdstat { // assemble configuration $gconf = (array)$extra; - if (!is_null($sub) && is_array($this->config_raw['graph.'.$sub])) { + if (!is_null($sub) && array_key_exists('graph.'.$sub, $this->config_raw) && is_array($this->config_raw['graph.'.$sub])) { $gconf = $gconf + $this->config_raw['graph.'.$sub]; } $gconf = $gconf + (array)$this->config_graph;