summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Net/LDAP3.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/Net/LDAP3.php b/lib/Net/LDAP3.php
index aa63cd1..9e4bd9b 100644
--- a/lib/Net/LDAP3.php
+++ b/lib/Net/LDAP3.php
@@ -129,7 +129,16 @@ class Net_LDAP3
if (!empty($config) && is_array($config)) {
foreach ($config as $key => $value) {
if (!isset($this->config[$key]) || empty($this->config[$key])) {
- $this->config[$key] = $value;
+ $setter = 'config_set_' . $key;
+ if (method_exists($this, $setter)) {
+ $this->$setter($value);
+ }
+ else if (isset($this->$key)) {
+ $this->$key = $value;
+ }
+ else {
+ $this->config[$key] = $value;
+ }
}
}
}