summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-09-22 11:25:30 (GMT)
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-09-22 11:25:30 (GMT)
commita83404b2109079c4b44c70153d565e45857708e8 (patch)
tree7d37a75a1ab7fccb1bf8c6de2b3ddfcbfd6932eb
parent62fdffda5e9802bc6a33f5be36931f334a2583a1 (diff)
downloadNet_LDAP3-a83404b2109079c4b44c70153d565e45857708e8.tar.gz
Correct the test of the additional filter when VLV is active
-rw-r--r--lib/Net/LDAP3.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/Net/LDAP3.php b/lib/Net/LDAP3.php
index a69e283..31247a6 100644
--- a/lib/Net/LDAP3.php
+++ b/lib/Net/LDAP3.php
@@ -1163,9 +1163,13 @@ class Net_LDAP3
$this->_debug("Using function $function on scope $scope (\$ns_function is $ns_function)");
- if ($this->vlv_active && isset($this->additional_filter)) {
- $filter = "(&" . $filter . $this->additional_filter . ")";
- $this->_debug("C: Setting a filter of " . $filter);
+ if ($this->vlv_active) {
+ if (isset($this->additional_filter) && !empty($this->additional_filter)) {
+ $filter = "(&" . $filter . $this->additional_filter . ")";
+ $this->_debug("C: (With VLV) Setting a filter (with additional filter) of " . $filter);
+ } else {
+ $this->_debug("C: (With VLV) Setting a filter (without additional filter) of " . $filter);
+ }
} else {
$filter = "(&" . $filter . $this->additional_filter . ")";
$this->_debug("C: (Without VLV) Setting a filter of " . $filter);