Fix for DOMDocument behavior for newer PHP versions.
Fix for DOMDocument behavior for newer PHP versions.

mozilla/theopenstandard,mozilla/theopenstandard,mozilla/theopenstandard,mozilla/theopenstandard