summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2012-01-18 13:16:04 +0000
committeralecpl <alec@alec.pl>2012-01-18 13:16:04 +0000
commit08b7b66e7615acdb08ce7940c4ad18f85aab40f2 (patch)
treed59fff6ef97b2d2322367ae5cdbcaa1e912aac8e /program
parent0457c5d1017903b57c0a8235bcc9685f255fc150 (diff)
- Handle ldap_public misconfiguration
Diffstat (limited to 'program')
-rw-r--r--program/include/rcmail.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/program/include/rcmail.php b/program/include/rcmail.php
index abfb498bc..65877378f 100644
--- a/program/include/rcmail.php
+++ b/program/include/rcmail.php
@@ -489,7 +489,11 @@ class rcmail
if ($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(
'id' => $id,
'name' => $prop['name'],
@@ -498,6 +502,7 @@ class rcmail
'hidden' => $prop['hidden'],
'autocomplete' => in_array($id, $autocomplete)
);
+ }
}
$plugin = $this->plugins->exec_hook('addressbooks_list', array('sources' => $list));