Merge "Language::truncate(): don't chop up multibyte characters when input contains...
[lhc/web/wiklou.git] / includes / media / PNGMetadataExtractor.php
index 30376f1..ac92460 100644 (file)
@@ -201,9 +201,9 @@ class PNGMetadataExtractor {
                                        // if compressed
                                        if ( $items[2] == "\x01" ) {
                                                if ( function_exists( 'gzuncompress' ) && $items[4] === "\x00" ) {
-                                                       wfSuppressWarnings();
+                                                       MediaWiki\suppressWarnings();
                                                        $items[5] = gzuncompress( $items[5] );
-                                                       wfRestoreWarnings();
+                                                       MediaWiki\restoreWarnings();
 
                                                        if ( $items[5] === false ) {
                                                                // decompression failed
@@ -245,9 +245,9 @@ class PNGMetadataExtractor {
                                        fseek( $fh, self::$crcSize, SEEK_CUR );
                                        continue;
                                }
-                               wfSuppressWarnings();
+                               MediaWiki\suppressWarnings();
                                $content = iconv( 'ISO-8859-1', 'UTF-8', $content );
-                               wfRestoreWarnings();
+                               MediaWiki\restoreWarnings();
 
                                if ( $content === false ) {
                                        throw new Exception( __METHOD__ . ": Read error (error with iconv)" );
@@ -285,9 +285,9 @@ class PNGMetadataExtractor {
                                                continue;
                                        }
 
-                                       wfSuppressWarnings();
+                                       MediaWiki\suppressWarnings();
                                        $content = gzuncompress( $content );
-                                       wfRestoreWarnings();
+                                       MediaWiki\restoreWarnings();
 
                                        if ( $content === false ) {
                                                // decompression failed
@@ -296,9 +296,9 @@ class PNGMetadataExtractor {
                                                continue;
                                        }
 
-                                       wfSuppressWarnings();
+                                       MediaWiki\suppressWarnings();
                                        $content = iconv( 'ISO-8859-1', 'UTF-8', $content );
-                                       wfRestoreWarnings();
+                                       MediaWiki\restoreWarnings();
 
                                        if ( $content === false ) {
                                                throw new Exception( __METHOD__ . ": Read error (error with iconv)" );
@@ -413,7 +413,7 @@ class PNGMetadataExtractor {
         *
         * @param resource $fh The file handle
         * @param int $size Size in bytes.
-        * @throws Exception if too big.
+        * @throws Exception If too big
         * @return string The chunk.
         */
        private static function read( $fh, $size ) {