Merge pull request #11791 from civicrm/4.7.31-rc
[civicrm-core.git] / CRM / Utils / Migrate / Import.php
index 912e5f1b8bfda3657bfc5d11b9a61c34aa47c290..8a9cf99e74f8d0bdd0fc8d4868afb9ead7cac9d1 100644 (file)
@@ -3,7 +3,7 @@
  +--------------------------------------------------------------------+
  | CiviCRM version 4.7                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2016                                |
+ | Copyright CiviCRM LLC (c) 2004-2018                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -28,7 +28,7 @@
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2016
+ * @copyright CiviCRM LLC (c) 2004-2018
  */
 class CRM_Utils_Migrate_Import {
   /**
@@ -48,7 +48,9 @@ class CRM_Utils_Migrate_Import {
   public function run($file) {
     // read xml file
     $dom = new DomDocument();
-    if (!$dom->load($file)) {
+    $xmlString = file_get_contents($file);
+    $load = $dom->loadXML($xmlString);
+    if (!$load) {
       throw new CRM_Core_Exception("Failed to parse XML file \"$file\"");
     }
     $dom->xinclude();