Skip to content

Commit

Permalink
call ldap_connect with 1 parameter
Browse files Browse the repository at this point in the history
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
  • Loading branch information
tenzap committed Nov 28, 2023
1 parent d37c479 commit 7febb87
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions application/plugins/phonebook_ldap/config/phonebook_ldap.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
2 changes: 1 addition & 1 deletion application/plugins/phonebook_ldap/phonebook_ldap.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 7febb87

Please sign in to comment.