- Handle ldap_public misconfiguration

pull/1/head
alecpl 13 years ago
parent 0457c5d101
commit 08b7b66e76

@ -489,7 +489,11 @@ class rcmail
if ($ldap_config) { if ($ldap_config) {
$ldap_config = (array) $ldap_config; $ldap_config = (array) $ldap_config;
foreach ($ldap_config as $id => $prop) foreach ($ldap_config as $id => $prop) {
// handle misconfiguration
if (empty($prop) || !is_array($prop)) {
continue;
}
$list[$id] = array( $list[$id] = array(
'id' => $id, 'id' => $id,
'name' => $prop['name'], 'name' => $prop['name'],
@ -498,6 +502,7 @@ class rcmail
'hidden' => $prop['hidden'], 'hidden' => $prop['hidden'],
'autocomplete' => in_array($id, $autocomplete) 'autocomplete' => in_array($id, $autocomplete)
); );
}
} }
$plugin = $this->plugins->exec_hook('addressbooks_list', array('sources' => $list)); $plugin = $this->plugins->exec_hook('addressbooks_list', array('sources' => $list));

Loading…
Cancel
Save