Browse Source

- Fix warning when properties array is empty

pull/1/head
alecpl 14 years ago
parent
commit
38dc510b2d
  1. 4
      program/include/rcube_ldap.php

4
program/include/rcube_ldap.php

@ -63,7 +63,7 @@ class rcube_ldap extends rcube_addressbook
/** /**
* Object constructor * Object constructor
* *
* @param array LDAP connection properties
* @param array LDAP connection properties
* @param boolean Enables debug mode * @param boolean Enables debug mode
* @param string Current user mail domain name * @param string Current user mail domain name
* @param integer User-ID * @param integer User-ID
@ -95,7 +95,7 @@ class rcube_ldap extends rcube_addressbook
foreach ($p['fieldmap'] as $rf => $lf) foreach ($p['fieldmap'] as $rf => $lf)
$this->fieldmap[$rf] = $this->_attr_name(strtolower($lf)); $this->fieldmap[$rf] = $this->_attr_name(strtolower($lf));
} }
else {
else if (!empty($p)) {
// read deprecated *_field properties to remain backwards compatible // read deprecated *_field properties to remain backwards compatible
foreach ($p as $prop => $value) foreach ($p as $prop => $value)
if (preg_match('/^(.+)_field$/', $prop, $matches)) if (preg_match('/^(.+)_field$/', $prop, $matches))

Loading…
Cancel
Save