diff --git a/lib/kolab_sync.php b/lib/kolab_sync.php --- a/lib/kolab_sync.php +++ b/lib/kolab_sync.php @@ -45,6 +45,8 @@ public $username; public $password; + public $task = null; + const CHARSET = 'UTF-8'; const VERSION = "2.3.22"; @@ -207,7 +209,7 @@ } // LDAP server failure... send 503 error - if ($auth['kolab_ldap_error']) { + if ($auth['kolab_ldap_error'] ?? null) { self::server_error(); } @@ -223,7 +225,7 @@ } // Authenticate - get Roundcube user ID - if (!$auth['abort'] && ($userid = $this->login($auth['user'], $auth['pass'], $auth['host'], $err))) { + if (!($auth['abort'] ?? false) && ($userid = $this->login($auth['user'], $auth['pass'], $auth['host'], $err))) { // set real username $this->username = $auth['user']; return $userid; @@ -298,6 +300,7 @@ // parse $host $a_host = parse_url($host); + $port = null; if ($a_host['host']) { $host = $a_host['host']; $ssl = (isset($a_host['scheme']) && in_array($a_host['scheme'], array('ssl','imaps','tls'))) ? $a_host['scheme'] : null;