diff -urN ../z-push-2.6.2+0.orig/src/backend/searchldap/searchldap.php ./src/backend/searchldap/searchldap.php --- ../z-push-2.6.2+0.orig/src/backend/searchldap/searchldap.php 2021-02-04 03:38:38.000000000 +0200 +++ ./src/backend/searchldap/searchldap.php 2021-09-10 22:49:29.901293000 +0300 @@ -47,6 +47,9 @@ // Connect if (defined('LDAP_SERVER_URI')) { $this->connection = @ldap_connect(LDAP_SERVER_URI); + if (!is_resource($this->connection)) { + throw new StatusException("BackendSearchLDAP(): Incorrect LDAP_SERVER_URI '" . LDAP_SERVER_URI . "'. Search aborted.", SYNC_SEARCHSTATUS_STORE_SERVERERROR, null, LOGLEVEL_FATAL); + } @ldap_set_option($this->connection, LDAP_OPT_PROTOCOL_VERSION, 3); } else {