X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Flibs%2Fxmp%2FXMP.php;h=6a4d7c42d4dd7a5eb2a52bb5edaf79385d9e87e0;hb=3af04875626877013fe6181f727902088df85618;hp=88e816a72a5dd6ffdd16cb23c9a21f47187680f9;hpb=4ad03aa11dacd2f443105e43fd1429398aa73bdc;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/libs/xmp/XMP.php b/includes/libs/xmp/XMP.php index 88e816a72a..6a4d7c42d4 100644 --- a/includes/libs/xmp/XMP.php +++ b/includes/libs/xmp/XMP.php @@ -343,9 +343,9 @@ class XMPReader implements LoggerAwareInterface { } if ( $this->charset !== 'UTF-8' ) { // don't convert if already utf-8 - MediaWiki\suppressWarnings(); + Wikimedia\suppressWarnings(); $content = iconv( $this->charset, 'UTF-8//IGNORE', $content ); - MediaWiki\restoreWarnings(); + Wikimedia\restoreWarnings(); } // Ensure the XMP block does not have an xml doctype declaration, which @@ -571,7 +571,7 @@ class XMPReader implements LoggerAwareInterface { // Even with LIBXML_NOWARNING set, XMLReader::read gives a warning // when parsing truncated XML, which causes unit tests to fail. - MediaWiki\suppressWarnings(); + Wikimedia\suppressWarnings(); while ( $reader->read() ) { if ( $reader->nodeType === XMLReader::ELEMENT ) { // Reached the first element without hitting a doctype declaration @@ -585,7 +585,7 @@ class XMPReader implements LoggerAwareInterface { break; } } - MediaWiki\restoreWarnings(); + Wikimedia\restoreWarnings(); if ( !is_null( $result ) ) { return $result; @@ -838,7 +838,7 @@ class XMPReader implements LoggerAwareInterface { return; } - if ( count( $this->mode[0] ) === 0 ) { + if ( count( $this->mode ) === 0 ) { // This should never ever happen and means // there is a pretty major bug in this class. throw new RuntimeException( 'Encountered end element with no mode' );