From 7febb87b8248c8a3a3d5aebea1738462732456c1 Mon Sep 17 00:00:00 2001 From: tenzap Date: Sun, 24 Sep 2023 15:44:55 +0200 Subject: [PATCH] call ldap_connect with 1 parameter PHP 8.3 has: Deprecate calling 'ldap_connect' with 2 parameters So we have to use the 1 parameter call instead See: https://wiki.php.net/rfc/deprecations_php_8_3 --- application/plugins/phonebook_ldap/config/phonebook_ldap.php | 3 +-- application/plugins/phonebook_ldap/phonebook_ldap.php | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/application/plugins/phonebook_ldap/config/phonebook_ldap.php b/application/plugins/phonebook_ldap/config/phonebook_ldap.php index 24b0404b8..1df259460 100644 --- a/application/plugins/phonebook_ldap/config/phonebook_ldap.php +++ b/application/plugins/phonebook_ldap/config/phonebook_ldap.php @@ -15,8 +15,7 @@ | */ // phpcs:enable -$config['server'] = 'server.hostname.com'; -$config['port'] = '389'; +$config['ldap_connect_uri'] = 'ldap://server.hostname.com:389'; $config['username'] = 'user@server.hostname.com'; $config['password'] = 'password'; $config['dn'] = 'dc=server,dc=hostname,dc=com'; diff --git a/application/plugins/phonebook_ldap/phonebook_ldap.php b/application/plugins/phonebook_ldap/phonebook_ldap.php index 7d71feaa1..34d4a4548 100644 --- a/application/plugins/phonebook_ldap/phonebook_ldap.php +++ b/application/plugins/phonebook_ldap/phonebook_ldap.php @@ -69,7 +69,7 @@ function phonebook_ldap($number) $config = Plugin_helper::get_plugin_config('phonebook_ldap'); // specify the LDAP server to connect to - $conn = ldap_connect($config['server'], $config['port']); + $conn = ldap_connect($config['ldap_connect_uri']); if ( ! $conn) { return FALSE;