From 6c31c40ddf29ae06546aa56a9b6d2e3798271411 Mon Sep 17 00:00:00 2001 From: ralf Date: Mon, 4 Apr 2022 09:21:52 +0300 Subject: [PATCH] LDAP resources are objects (no longer resources) from PHP 8.1+ --- api/src/Ldap.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api/src/Ldap.php b/api/src/Ldap.php index 11ae2d86a7..b30d3a79f5 100644 --- a/api/src/Ldap.php +++ b/api/src/Ldap.php @@ -74,12 +74,12 @@ class Ldap * * Use this factory method to open only a single connection to LDAP server! * - * @param boolean $ressource =true true: return LDAP ressource for ldap_*-methods, + * @param boolean $ressource =true true: return LDAP object/ressource for ldap_*-methods, * false: return connected instances of this Api\Ldap class * @param string $host ='' ldap host, default $GLOBALS['egw_info']['server']['ldap_host'] * @param string $dn ='' ldap dn, default $GLOBALS['egw_info']['server']['ldap_root_dn'] * @param string $passwd ='' ldap pw, default $GLOBALS['egw_info']['server']['ldap_root_pw'] - * @return resource|Ldap resource from ldap_connect() or false on error + * @return object|resource|self|false resource/object from ldap_connect(), self or false on error * @throws Exception\AssertionFailed 'LDAP support unavailable!' (no ldap extension) * @throws Exception\NoPermission if bind fails */ @@ -273,7 +273,7 @@ class Ldap */ function ldapDisconnect() { - if(is_resource($this->ds)) + if ($this->ds) { ldap_unbind($this->ds); unset($this->ds); @@ -302,4 +302,4 @@ class Ldap Cache::setSession(__CLASS__, 'ldapServerInfo', $this->ldapserverinfo); } } -} +} \ No newline at end of file