dbug
This commit is contained in:
1 parent
b4f1357b44
commit
9f6f296125
1 file changed
+6
-2
@@ -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";
|
||||
|
||||
Reference in new issue
Block a user