summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2008-06-25 07:18:20 +0000
committeralecpl <alec@alec.pl>2008-06-25 07:18:20 +0000
commit3dc20a0d4e88f454440b1bf1ac4a27e150c69b72 (patch)
tree380b56552f407775d528d92b1c367c094991990c
parent1c25366406b19324e0419bb3e4798b6e50b37f4e (diff)
#1485161
-rw-r--r--program/steps/addressbook/func.inc6
1 files changed, 4 insertions, 2 deletions
diff --git a/program/steps/addressbook/func.inc b/program/steps/addressbook/func.inc
index 6d0a3938c..98c56af78 100644
--- a/program/steps/addressbook/func.inc
+++ b/program/steps/addressbook/func.inc
@@ -53,8 +53,10 @@ if (strtolower($CONFIG['address_book_type']) != 'ldap') {
// We are using the DB address book, add it.
$js_list = array("0" => array('id' => 0, 'readonly' => false));
} // end if
-foreach ((array)$CONFIG['ldap_public'] as $id => $prop)
- $js_list[$id] = array('id' => $id, 'readonly' => !$prop['writable']);
+else if (!empty($CONFIG['ldap_public'])) {
+ foreach ($CONFIG['ldap_public'] as $id => $prop)
+ $js_list[$id] = array('id' => $id, 'readonly' => !$prop['writable']);
+}
$OUTPUT->set_env('address_sources', $js_list);