summaryrefslogtreecommitdiff
path: root/program/lib/Roundcube
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2015-01-21 10:29:08 +0100
committerAleksander Machniak <alec@alec.pl>2015-01-21 10:29:08 +0100
commitbf99c50cc18d3bf35f85f5b3b09293f27605b1d2 (patch)
tree92c1b944adc2daaef84591ecfe1567c4b4be335f /program/lib/Roundcube
parent704b0bace6562092d044f619bafc9897b8dd210b (diff)
Fix bug where empty fieldmap config entries caused empty results of ldap search (#1490229)
Diffstat (limited to 'program/lib/Roundcube')
-rw-r--r--program/lib/Roundcube/rcube_ldap.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/program/lib/Roundcube/rcube_ldap.php b/program/lib/Roundcube/rcube_ldap.php
index 981f2e841..13d55bde6 100644
--- a/program/lib/Roundcube/rcube_ldap.php
+++ b/program/lib/Roundcube/rcube_ldap.php
@@ -117,13 +117,14 @@ class rcube_ldap extends rcube_addressbook
// fieldmap property is given
if (is_array($p['fieldmap'])) {
+ $p['fieldmap'] = array_filter($p['fieldmap']);
foreach ($p['fieldmap'] as $rf => $lf)
$this->fieldmap[$rf] = $this->_attr_name(strtolower($lf));
}
else if (!empty($p)) {
// read deprecated *_field properties to remain backwards compatible
foreach ($p as $prop => $value)
- if (preg_match('/^(.+)_field$/', $prop, $matches))
+ if (!empty($value) && preg_match('/^(.+)_field$/', $prop, $matches))
$this->fieldmap[$matches[1]] = $this->_attr_name(strtolower($value));
}