summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-12-18 11:38:55 (GMT)
committerAleksander Machniak <alec@alec.pl>2013-12-18 11:39:44 (GMT)
commit64e84bb211baad7d6b5d65f34c00ad2d296a246c (patch)
tree1d950abf97f4c8989374f5178cb11c3cf37f20d9
parent0e4c76872236be7db4599aeabef27fe6352a90f7 (diff)
downloadkolab-wap-64e84bb211baad7d6b5d65f34c00ad2d296a246c.tar.gz
Fix possible fatal error when increment() method is called on non-existing Memcache object
-rw-r--r--lib/Auth/LDAP.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Auth/LDAP.php b/lib/Auth/LDAP.php
index a7dfe1c..8ef191e 100644
--- a/lib/Auth/LDAP.php
+++ b/lib/Auth/LDAP.php
@@ -1603,10 +1603,10 @@ class LDAP extends Net_LDAP3 {
$this->mc_available += intval($this->memcache->addServer(
$host, $port, $pconnect, 1, 1, 15, false, array($this, 'memcache_failure')));
}
- }
- // test connection and failover (will result in $this->mc_available == 0 on complete failure)
- $this->memcache->increment('__CONNECTIONTEST__', 1); // NOP if key doesn't exist
+ // test connection and failover (will result in $this->mc_available == 0 on complete failure)
+ $this->memcache->increment('__CONNECTIONTEST__', 1); // NOP if key doesn't exist
+ }
if (!$this->mc_available) {
$this->memcache = false;