From aa3c91b6dc8ee2cdba29ebbc4543265b903bd63a Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Thu, 10 Oct 2024 10:19:15 +0200 Subject: [PATCH] silence warnings triggered when malformed XML is parsed The constructor of the SimpleXMLElement class issues a warning if the passed data is not valid. --- .../Notifier/Bridge/KazInfoTeh/KazInfoTehTransport.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Notifier/Bridge/KazInfoTeh/KazInfoTehTransport.php b/src/Symfony/Component/Notifier/Bridge/KazInfoTeh/KazInfoTehTransport.php index c35cf4509a68f..0a89f13771bfd 100644 --- a/src/Symfony/Component/Notifier/Bridge/KazInfoTeh/KazInfoTehTransport.php +++ b/src/Symfony/Component/Notifier/Bridge/KazInfoTeh/KazInfoTehTransport.php @@ -80,7 +80,7 @@ protected function doSend(MessageInterface $message): SentMessage } try { - $content = new \SimpleXMLElement($response->getContent(false)); + $content = @new \SimpleXMLElement($response->getContent(false)); } catch (\Exception $e) { throw new TransportException('Unable to send the SMS: "Couldn\'t read response".', $response, previous: $e); }