diff --git a/program/lib/Roundcube/rcube_ldap.php b/program/lib/Roundcube/rcube_ldap.php index e6d79c13f..e8f9a8e72 100644 --- a/program/lib/Roundcube/rcube_ldap.php +++ b/program/lib/Roundcube/rcube_ldap.php @@ -833,15 +833,12 @@ class rcube_ldap extends rcube_addressbook } else { // map address book fields into ldap attributes - $me = $this; $attributes = array(); - $fields = (array) $fields; - - array_walk($fields, function($field) use ($me, &$attributes) { - if ($me->coltypes[$field] && ($attrs = (array)$me->coltypes[$field]['attributes'])) { - $attributes = array_merge($attributes, $attrs); + foreach ((array) $fields as $field) { + if ($this->coltypes[$field] && ($attrs = $this->coltypes[$field]['attributes'])) { + $attributes = array_merge($attributes, (array) $attrs); } - }); + } } // compose a full-text-like search filter