X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Futils%2FUIDGenerator.php;h=0ce90c1d9877879640d09793a33617af44f18c75;hb=ac815f2d4fd132d9613076a3960979dc7549b4e2;hp=c7bb4f3ccbfe83f573fa60aa0b3a2162ab6b1f34;hpb=85d4e39ff096d05386fd2f333cd6acea66ad6f90;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/utils/UIDGenerator.php b/includes/utils/UIDGenerator.php index c7bb4f3ccb..0ce90c1d98 100644 --- a/includes/utils/UIDGenerator.php +++ b/includes/utils/UIDGenerator.php @@ -278,12 +278,14 @@ class UIDGenerator { 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;