$xml .= "</list>";
$dom = new DOMDocument();
- wfSuppressWarnings();
+ MediaWiki\suppressWarnings();
$result = $dom->loadXML( $xml );
- wfRestoreWarnings();
+ MediaWiki\restoreWarnings();
if ( !$result ) {
// Try running the XML through UtfNormal to get rid of invalid characters
$xml = UtfNormal\Validator::cleanUp( $xml );
$cacheable = ( $wgPreprocessorCacheThreshold !== false
&& strlen( $text ) > $wgPreprocessorCacheThreshold );
if ( $cacheable ) {
-
$cacheKey = wfMemcKey( 'preprocess-xml', md5( $text ), $flags );
$cacheValue = $wgMemc->get( $cacheKey );
if ( $cacheValue ) {
}
$dom = new DOMDocument;
- wfSuppressWarnings();
+ MediaWiki\suppressWarnings();
$result = $dom->loadXML( $xml );
- wfRestoreWarnings();
+ MediaWiki\restoreWarnings();
if ( !$result ) {
// Try running the XML through UtfNormal to get rid of invalid characters
$xml = UtfNormal\Validator::cleanUp( $xml );