From 7f2cccb94a68b85c36605dfa6b25e2496fffbcfc Mon Sep 17 00:00:00 2001 From: Andrew Ruthven Date: Mon, 1 Apr 2024 20:46:13 +1300 Subject: [PATCH] Use isset when checking that the key exists To resolve errors like this: Warning: Undefined array key "example.net" in /usr/share/davical/inc/iSchedule.php on line 207 --- inc/iSchedule.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/iSchedule.php b/inc/iSchedule.php index 930a5e84..ca426def 100644 --- a/inc/iSchedule.php +++ b/inc/iSchedule.php @@ -204,7 +204,7 @@ class iSchedule function getServer ( ) { global $icfg; - if ( isset($icfg) && $icfg [ $this->domain ] ) + if ( isset($icfg) && isset($icfg[$this->domain]) ) { $this->remote_server = $icfg [ $this->domain ] [ 'server' ]; $this->remote_port = $icfg [ $this->domain ] [ 'port' ];