Yaffs site version 1.1
[yaffs-website] / web / modules / contrib / migrate_plus / src / Plugin / migrate_plus / data_parser / Xml.php
index 0213a0f7bb4df3454ff0d88de44168569a883ae6..6c08069276e886dd3907c0cc22ec3a2e18f2b78b 100644 (file)
@@ -174,6 +174,13 @@ class Xml extends DataParserPluginBase {
   protected function openSourceUrl($url) {
     // (Re)open the provided URL.
     $this->reader->close();
+
+    // Clear XML error buffer. Other Drupal code that executed during the
+    // migration may have polluted the error buffer and could create false
+    // positives in our error check below. We are only concerned with errors
+    // that occur from attempting to load the XML string into an object here.
+    libxml_clear_errors();
+
     return $this->reader->open($url, NULL, \LIBXML_NOWARNING);
   }