Both XML parsers use libxml_get_errors() to determine if there were issues the underlying XML library had when processing XML into an object. However, the error buffer is not cleared before the processor loads XML into an object, so any existing errors in the buffer from other Drupal code that executed during the migration of data would create false positives.

This patch fixes it for the SimpleXml parser. I'm not using the more advanced parser anymore, but something similar could be applied there.

CommentFileSizeAuthor
#2 2860788.patch891 bytesbkosborne
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bkosborne created an issue. See original summary.

bkosborne’s picture

Status: Active » Needs review
FileSize
891 bytes

  • mikeryan committed 8b68f19 on 8.x-4.x authored by bkosborne
    Issue #2860788 by bkosborne: XML parser should clear XML error buffer...

  • mikeryan committed b94a389 on 8.x-3.x authored by bkosborne
    Issue #2860788 by bkosborne: XML parser should clear XML error buffer...
mikeryan’s picture

Status: Needs review » Fixed

Nice simple obvious fix - applied to Xml.php as well, thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.