diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-04-01 15:54:57 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-04-01 15:54:57 +0000 |
| commit | b738768c1136ada26d674cd987360ddb390f3f66 (patch) | |
| tree | 7413abda73c9d4020e22c4cf7dd9fb2c80d5c8ab /roundcubemail/program/include | |
| parent | 57ef1bdc3964eb52114fd76542d4086f83c72195 (diff) | |
- Fix sources list if 'ldap_public' is null/false
git-svn-id: https://svn.roundcube.net/trunk@3466 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include')
| -rw-r--r-- | roundcubemail/program/include/rcmail.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/roundcubemail/program/include/rcmail.php b/roundcubemail/program/include/rcmail.php index 09957ee0f..c9a06584a 100644 --- a/roundcubemail/program/include/rcmail.php +++ b/roundcubemail/program/include/rcmail.php @@ -292,8 +292,8 @@ class rcmail public function get_address_sources($writeable = false) { $abook_type = strtolower($this->config->get('address_book_type')); - $ldap_config = (array)$this->config->get('ldap_public'); - $autocomplete = (array)$this->config->get('autocomplete_addressbooks'); + $ldap_config = $this->config->get('ldap_public'); + $autocomplete = (array) $this->config->get('autocomplete_addressbooks'); $list = array(); // We are using the DB address book @@ -308,7 +308,8 @@ class rcmail ); } - if (is_array($ldap_config)) { + if ($ldap_config) { + $ldap_config = (array) $ldap_config; foreach ($ldap_config as $id => $prop) $list[$id] = array( 'id' => $id, @@ -329,7 +330,7 @@ class rcmail } } } - + return $list; } |
