From d2d9be650f8d57880ee4b2e5cf81ec043c060943 Mon Sep 17 00:00:00 2001 From: Justice Addison Date: Tue, 22 Oct 2024 10:59:21 +0000 Subject: [PATCH] remove a unicode character that is causing the sits import to fail --- application/tasks/sitsimport.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/application/tasks/sitsimport.php b/application/tasks/sitsimport.php index 1a279a64..9b121721 100644 --- a/application/tasks/sitsimport.php +++ b/application/tasks/sitsimport.php @@ -162,7 +162,9 @@ public function loadXML($path) Log::error('XML file has not been modified for more than 24 hours.'); } - $courses = simplexml_load_file($path); + $courses = file_get_contents($path); + $courses = preg_replace( '/[\x{200B}-\x{200D}]/u', '', $courses ); + $courses = simplexml_load_string($courses); if ($courses === false) { Log::error('XML file does not exist or is invalid.');