(bug 20274) Strict standards issue in 5.3.
[lhc/web/wiklou.git] / includes / memcached-client.php
index 27bdc99..7974530 100644 (file)
@@ -454,7 +454,7 @@ class memcached
       if (!$this->_active)
          return false;
 
-      $this->stats['get_multi']++;
+      @$this->stats['get_multi']++;
       $sock_keys = array();
 
       foreach ($keys as $key)
@@ -795,18 +795,13 @@ 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 key '". $hv % $this->_bucketcount . "' given!" );
-                   continue;
-                }
          $host = $this->_buckets[$hv % $this->_bucketcount];
          $sock = $this->sock_to_host($host);
          if (is_resource($sock)) {
             $this->_flush_read_buffer($sock);
             return $sock;
-         }
-         $hv += $this->_hashfunc($tries . $realkey);
+                }
+         $hv = $this->_hashfunc( $hv . $realkey );
       }
 
       return false;