X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Fobjectcache%2FBagOStuff.php;h=6f8f9afd2d159bbf087f3f6e6d32e07df1eaae68;hb=768493b825348b42e4bf9837153a937c8033c59e;hp=56f1be23b5252792cbd636a9f82defb45db06287;hpb=94c8c3bdd94bdc32e1dce900cbf45ce2f634dfc0;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/objectcache/BagOStuff.php b/includes/objectcache/BagOStuff.php index 56f1be23b5..6f8f9afd2d 100644 --- a/includes/objectcache/BagOStuff.php +++ b/includes/objectcache/BagOStuff.php @@ -46,10 +46,10 @@ abstract class BagOStuff { protected $lastError = self::ERR_NONE; /** Possible values for getLastError() */ - const ERR_NONE = 0; // no error + const ERR_NONE = 0; // no error const ERR_NO_RESPONSE = 1; // no response const ERR_UNREACHABLE = 2; // can't connect - const ERR_UNEXPECTED = 3; // response gave some error + const ERR_UNEXPECTED = 3; // response gave some error /** * @param bool $bool @@ -251,7 +251,7 @@ abstract class BagOStuff { * Batch insertion * @param array $data $key => $value assoc array * @param int $exptime Either an interval in seconds or a unix timestamp for expiry - * @return bool success + * @return bool Success * @since 1.24 */ public function setMulti( array $data, $exptime = 0 ) { @@ -330,15 +330,15 @@ abstract class BagOStuff { * This will create the key with value $init and TTL $ttl if not present * * @param string $key - * @param integer $ttl - * @param integer $value - * @param integer $init + * @param int $ttl + * @param int $value + * @param int $init * @return bool * @since 1.24 */ public function incrWithInit( $key, $ttl, $value = 1, $init = 1 ) { return $this->incr( $key, $value ) || - $this->add( $key, $init, $ttl ) || $this->incr( $key, $value ); + $this->add( $key, (int)$init, $ttl ) || $this->incr( $key, $value ); } /**