PHP 8 fixes

This commit is contained in:
Christian Mollekopf 2023-01-13 13:29:02 +01:00
parent b55ce1d203
commit de4e56a561
2 changed files with 2 additions and 2 deletions

View file

@ -272,7 +272,7 @@ class kolab_delegation_engine
}
// Get delegates of current user
$delegates = $user[$this->ldap_delegate_field];
$delegates = $user[$this->ldap_delegate_field] ?? null;
if (!empty($delegates)) {
foreach ((array)$delegates as $dn) {

View file

@ -105,7 +105,7 @@ class kolab_ldap extends rcube_ldap_generic
$replaces = array('%dn' => '', '%dc' => $dc, '%d' => $d, '%fu' => $fu, '%u' => $u);
// Search for the dn to use to authenticate
if ($this->config['search_base_dn'] && $this->config['search_filter']
if (($this->config['search_base_dn'] ?? false) && ($this->config['search_filter'] ?? false)
&& (strstr($bind_dn, '%dn') || strstr($base_dn, '%dn') || strstr($groups_base_dn, '%dn'))
) {
$search_attribs = array('uid');