diff --git a/services/Parser/XmlParser.php b/services/Parser/XmlParser.php index 05510d4..9ec80ca 100644 --- a/services/Parser/XmlParser.php +++ b/services/Parser/XmlParser.php @@ -51,8 +51,17 @@ class XmlParser { */ public function getDataFromXmlString( $xmlString ) { wfProfileIn( __METHOD__ ); + libxml_use_internal_errors( true ); $xml = simplexml_load_string( $xmlString ); if ( $xml === false ) { + $errors = libxml_get_errors(); + foreach ( $errors as $xmlerror ) { + \Wikia\Logger\WikiaLogger::instance()->debug( "PortableInfobox XML Parser problem", [ + "level" => $xmlerror->level, + "code" => $xmlerror->code, + "message" => $xmlerror->message ] ); + } + libxml_clear_errors(); throw new XmlMarkupParseErrorException(); }