more cssification of diff rendering, some " -> ' in diff engine
[lhc/web/wiklou.git] / includes / memcached-client.php
index d3d7d70..2752180 100644 (file)
@@ -292,7 +292,7 @@ class memcached
       
       $key = is_array($key) ? $key[1] : $key;
       
-      $this->stats['delete']++;
+      @$this->stats['delete']++;
       $cmd = "delete $key $time\r\n";
       if(!fwrite($sock, $cmd, strlen($cmd)))
       {
@@ -390,7 +390,7 @@ class memcached
          foreach ($val as $k => $v)
             $this->_debugprint(@sprintf("MemCache: sock %s got %s => %s\r\n", serialize($sock), $k, $v));
 
-      return $val[$key];
+      return @$val[$key];
    }
 
    // }}}
@@ -737,13 +737,7 @@ class memcached
     */
    function _hashfunc ($key)
    {
-      $hash = 0;
-      for ($i=0; $i<strlen($key); $i++)
-      {
-         $hash = $hash*33 + ord($key[$i]);
-      }
-      
-      return $hash;
+      return crc32($key);
    }
 
    // }}}