diff options
author | Aleksander Machniak <machniak@kolabsys.com> | 2018-01-26 14:57:04 +0100 |
---|---|---|
committer | Aleksander Machniak <machniak@kolabsys.com> | 2018-01-26 14:57:04 +0100 |
commit | 3bda3645113d957ee0f370e8d4c353a19585b4b9 (patch) | |
tree | 5e41ed6e625fd6414e05f2a703789c3e382c3fad | |
parent | 8741dfd6d72967d8095daf86d04cb2ce71310faa (diff) | |
download | webadmin-3bda3645113d957ee0f370e8d4c353a19585b4b9.tar.gz |
Fix PHP Warning: key() expects parameter 1 to be array, boolean givenkolab-webadmin-3.2.12kolab-webadmin-3.2.11
-rw-r--r-- | lib/kolab_api_service.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/kolab_api_service.php b/lib/kolab_api_service.php index 980932b..b552342 100644 --- a/lib/kolab_api_service.php +++ b/lib/kolab_api_service.php @@ -707,9 +707,11 @@ abstract class kolab_api_service } // Get the domain information for expansion later - $auth = Auth::get_instance(); + $auth = Auth::get_instance(); $domain_info = $auth->domain_info($_SESSION['user']->get_domain()); - $domain_info = $domain_info[key($domain_info)]; + $domain_info = empty($domain_info) ? null : $domain_info[key($domain_info)]; + + $dba = 'inetdomainbasedn'; $dna = $this->conf->get('domain_name_attribute'); if (empty($dna)) { @@ -721,8 +723,6 @@ abstract class kolab_api_service $domain = $domain[0]; } - $dba = 'inetdomainbasedn'; - if (empty($domain_info[$dba])) { $this->base_dn = 'dc=' . implode(',dc=', explode('.', $domain)); } else { |