avoid spamming logs with "PHP Strict Standards: Non-static method DOMDocument::loadXML() should not be called statically" with E_NOTICE and E_STRICT enabled

This commit is contained in:
Ilmari Karonen 2008-12-02 18:02:13 +00:00
parent c2ead4fc41
commit 82a6ced1e7

View file

@ -281,7 +281,8 @@ class ImageMap {
# Add the map HTML to the div
# We used to add it before the div, but that made tidy unhappy
if ( $mapHTML != '' ) {
$mapDoc = DOMDocument::loadXML( $mapHTML );
$mapDoc = new DOMDocument();
$mapDoc->loadXML( $mapHTML );
$mapNode = $domDoc->importNode( $mapDoc->documentElement, true );
$div->appendChild( $mapNode );
}