Update suppressWarning()/restoreWarning() calls
[lhc/web/wiklou.git] / includes / media / GIF.php
index b998d18..d65f872 100644 (file)
@@ -65,11 +65,11 @@ class GIFHandler extends BitmapHandler {
                $meta = $image->getMetadata();
 
                if ( !$meta ) {
-                       return array();
+                       return [];
                }
                $meta = unserialize( $meta );
                if ( !isset( $meta['metadata'] ) ) {
-                       return array();
+                       return [];
                }
                unset( $meta['metadata']['_MW_GIF_VERSION'] );
 
@@ -131,9 +131,9 @@ class GIFHandler extends BitmapHandler {
                        return self::METADATA_GOOD;
                }
 
-               MediaWiki\suppressWarnings();
+               Wikimedia\suppressWarnings();
                $data = unserialize( $metadata );
-               MediaWiki\restoreWarnings();
+               Wikimedia\restoreWarnings();
 
                if ( !$data || !is_array( $data ) ) {
                        wfDebug( __METHOD__ . " invalid GIF metadata\n" );
@@ -161,16 +161,16 @@ class GIFHandler extends BitmapHandler {
 
                $original = parent::getLongDesc( $image );
 
-               MediaWiki\suppressWarnings();
+               Wikimedia\suppressWarnings();
                $metadata = unserialize( $image->getMetadata() );
-               MediaWiki\restoreWarnings();
+               Wikimedia\restoreWarnings();
 
                if ( !$metadata || $metadata['frameCount'] <= 1 ) {
                        return $original;
                }
 
                /* Preserve original image info string, but strip the last char ')' so we can add even more */
-               $info = array();
+               $info = [];
                $info[] = $original;
 
                if ( $metadata['looped'] ) {
@@ -193,14 +193,14 @@ class GIFHandler extends BitmapHandler {
         *
         * Shown in the &query=imageinfo&iiprop=size api query.
         *
-        * @param $file File
+        * @param File $file
         * @return float The duration of the file.
         */
        public function getLength( $file ) {
                $serMeta = $file->getMetadata();
-               MediaWiki\suppressWarnings();
+               Wikimedia\suppressWarnings();
                $metadata = unserialize( $serMeta );
-               MediaWiki\restoreWarnings();
+               Wikimedia\restoreWarnings();
 
                if ( !$metadata || !isset( $metadata['duration'] ) || !$metadata['duration'] ) {
                        return 0.0;