From 8080d1e09d6f04533f43d53de8ec4b429fe365d3 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Sun, 19 May 2013 23:32:13 -0400 Subject: [PATCH] CRM_Utils_Migrate_Import - Fix static warning --- CRM/Utils/Migrate/Import.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CRM/Utils/Migrate/Import.php b/CRM/Utils/Migrate/Import.php index d2c312d65a..35990fc723 100644 --- a/CRM/Utils/Migrate/Import.php +++ b/CRM/Utils/Migrate/Import.php @@ -39,7 +39,10 @@ class CRM_Utils_Migrate_Import { function run($file) { // read xml file - $dom = DomDocument::load($file); + $dom = new DomDocument(); + if (! $dom->load($file)) { + throw new CRM_Core_Exception("Failed to parse XML file \"$file\""); + } $dom->xinclude(); $xml = simplexml_import_dom($dom); -- 2.25.1