lib/Auth

Aleksander Machniak machniak at kolabsys.com
Wed Dec 18 12:39:28 CET 2013


 lib/Auth/LDAP.php |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 2eb8ab1fa6caf11cc505c4fd63a50b465a02ea84
Author: Aleksander Machniak <alec at alec.pl>
Date:   Wed Dec 18 12:38:55 2013 +0100

    Fix possible fatal error when increment() method is called on non-existing Memcache object

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;




More information about the commits mailing list