summaryrefslogtreecommitdiff
path: root/program/include
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2009-09-04 17:25:57 +0000
committeralecpl <alec@alec.pl>2009-09-04 17:25:57 +0000
commit38066281b27728cf9ec8641f0a69fa923c4f093c (patch)
tree28cff6f28d47a345b53ed7b234b7a6fb2d353c88 /program/include
parentb24f2c48979b16228d200ff4b8dccc10ec8f8609 (diff)
- make sure 'required_fields' is an array (#1485892)
Diffstat (limited to 'program/include')
-rw-r--r--program/include/rcube_ldap.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/program/include/rcube_ldap.php b/program/include/rcube_ldap.php
index 016509cc7..9854ac01b 100644
--- a/program/include/rcube_ldap.php
+++ b/program/include/rcube_ldap.php
@@ -57,6 +57,10 @@ class rcube_ldap extends rcube_addressbook
if (preg_match('/^(.+)_field$/', $prop, $matches))
$this->fieldmap[$matches[1]] = $this->_attr_name(strtolower($value));
+ // make sure 'required_fields' is an array
+ if (!is_array($this->prop['required_fields']))
+ $this->prop['required_fields'] = (array) $this->prop['required_fields'];
+
foreach ($this->prop['required_fields'] as $key => $val)
$this->prop['required_fields'][$key] = $this->_attr_name(strtolower($val));