if ( ( $flags & self::QUICK_VOLATILE ) && PHP_SAPI !== 'cli' ) {
try {
$cache = ObjectCache::newAccelerator( array() );
- } catch ( MWException $e ) {} // not supported
+ } catch ( MWException $e ) {
+ // not supported
+ }
}
if ( $cache ) {
$counter = $cache->incr( $bucket, $count );
if ( $counter === false ) {
- if ( !$cache->add( $bucket, $count ) ) {
+ if ( !$cache->add( $bucket, (int)$count ) ) {
throw new MWException( 'Unable to set value to ' . get_class( $cache ) );
}
$counter = $count;