From 9f6f2961251885c1a928355162e4ce77df2fa959 Mon Sep 17 00:00:00 2001 From: salam Date: Fri, 6 Feb 2026 16:46:29 +0100 Subject: [PATCH] dbug --- app/Console/Commands/Xml.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/Console/Commands/Xml.php b/app/Console/Commands/Xml.php index 769f33c5..c9210b90 100644 --- a/app/Console/Commands/Xml.php +++ b/app/Console/Commands/Xml.php @@ -3,6 +3,7 @@ namespace App\Console\Commands; use App\Utilities\Notice; +use Log; use SimpleXMLElement; class Xml @@ -96,8 +97,11 @@ class Xml sleep(2); // Optional: Sleep between retries } else { curl_close($ch); - - return new SimpleXMLElement($response); + if (mb_substr($response, 0, 1) != '<') { + Log::debug('INVALID XML '.$url); + } else { + return new SimpleXMLElement($response); + } } } echo "All attempts failed.\n";