From 372047388f77744577eb46f7ad5b78870aef1d40 Mon Sep 17 00:00:00 2001 From: ralf Date: Tue, 20 Aug 2024 09:24:49 +0200 Subject: [PATCH] fix PHP Fatal Error stalling AD Sync: Declaration of Ads::connect($admin=false) must be compatible with Ldap::contect($admin=false, $reconnect=false) --- api/src/Contacts/Ads.php | 9 +++++---- api/src/Contacts/Ldap.php | 5 +++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/api/src/Contacts/Ads.php b/api/src/Contacts/Ads.php index f995f428bb..b701dd57df 100644 --- a/api/src/Contacts/Ads.php +++ b/api/src/Contacts/Ads.php @@ -150,15 +150,16 @@ class Ads extends Ldap } /** - * connect to LDAP server + * Connect to LDAP server * - * @param boolean $admin =false true (re-)connect with admin not user credentials, eg. to modify accounts + * @param boolean $admin =false true: (re-)connect with admin not user credentials, eg. to modify accounts + * @param boolean $reconnect =false true: force a reconnect */ - function connect($admin=false) + function connect($admin = false, $reconnect=false) { unset($admin); // not used, but required by function signature - $this->ds = $this->accounts_ads->ldap_connection(); + $this->ds = $this->accounts_ads->ldap_connection($reconnect); } /** diff --git a/api/src/Contacts/Ldap.php b/api/src/Contacts/Ldap.php index a64847db78..57047b58c0 100644 --- a/api/src/Contacts/Ldap.php +++ b/api/src/Contacts/Ldap.php @@ -397,9 +397,10 @@ class Ldap protected bool $admin_connection; /** - * connect to LDAP server + * Connect to LDAP server * - * @param boolean $admin =false true (re-)connect with admin not user credentials, eg. to modify accounts + * @param boolean $admin =false true: (re-)connect with admin not user credentials, eg. to modify accounts + * @param boolean $reconnect =false true: force a reconnect */ function connect($admin = false, $reconnect=false) {