Merge "objectcache: Optimise array_map in MemcachedBagOStuff::makeKey()"
[lhc/web/wiklou.git] / includes / media / GIFMetadataExtractor.php
index ac5fc81..4e5c4ea 100644 (file)
@@ -161,9 +161,9 @@ class GIFMetadataExtractor {
                                        UtfNormal\Validator::quickIsNFCVerify( $dataCopy );
 
                                        if ( $dataCopy !== $data ) {
-                                               MediaWiki\suppressWarnings();
+                                               Wikimedia\suppressWarnings();
                                                $data = iconv( 'windows-1252', 'UTF-8', $data );
-                                               MediaWiki\restoreWarnings();
+                                               Wikimedia\restoreWarnings();
                                        }
 
                                        $commentCount = count( $comment );
@@ -264,7 +264,7 @@ class GIFMetadataExtractor {
         */
        static function readGCT( $fh, $bpp ) {
                if ( $bpp > 0 ) {
-                       $max = pow( 2, $bpp );
+                       $max = 2 ** $bpp;
                        for ( $i = 1; $i <= $max; ++$i ) {
                                fread( $fh, 3 );
                        }
@@ -282,6 +282,7 @@ class GIFMetadataExtractor {
                }
                $buf = unpack( 'C', $data )[1];
                $bpp = ( $buf & 7 ) + 1;
+               // @phan-suppress-next-line PhanTypeInvalidLeftOperandOfIntegerOp
                $buf >>= 7;
 
                $have_map = $buf & 1;