Fix for r41108 (as per comment on bug 15642): Also disallow blocking anonymous users
[lhc/web/wiklou.git] / includes / memcached-client.php
index 6bd1838..cf98bb9 100644 (file)
@@ -795,6 +795,11 @@ class memcached
       $realkey = is_array($key) ? $key[1] : $key;
       for ($tries = 0; $tries<20; $tries++)
       {
+            // temp logging for strange bug
+                if( !isset($this->_buckets[$hv % $this->_bucketcount]) ) {
+                   wfDebugLog( "memcached", "Invalid bucket hash '$hv' from key '$realkey' given!" );
+                   continue;
+                }
          $host = $this->_buckets[$hv % $this->_bucketcount];
          $sock = $this->sock_to_host($host);
          if (is_resource($sock)) {