X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fmedia%2FPNGMetadataExtractor.php;h=ac92460ea6453c199b01818f0d21b765f4643897;hb=ef9a75c4d545c2edde9d3f0ea78ba92cf6b9658b;hp=30376f1e1b6bcc099255dedcc27405a32c29c92a;hpb=a5b5f90fb956605601bd14aed695c8c962b0d064;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/media/PNGMetadataExtractor.php b/includes/media/PNGMetadataExtractor.php index 30376f1e1b..ac92460ea6 100644 --- a/includes/media/PNGMetadataExtractor.php +++ b/includes/media/PNGMetadataExtractor.php @@ -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 ) {