From 72df7924aec393a08f9c5c66a818924eae4f4f16 Mon Sep 17 00:00:00 2001 From: Alexis Urien Date: Mon, 8 Apr 2024 10:06:16 -0700 Subject: [PATCH] Remove potential ending line break when using edebug() with LoggerInterface --- src/SMTP.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SMTP.php b/src/SMTP.php index 71c0a442..1c973a21 100644 --- a/src/SMTP.php +++ b/src/SMTP.php @@ -281,7 +281,7 @@ class SMTP //Is this a PSR-3 logger? if ($this->Debugoutput instanceof \Psr\Log\LoggerInterface) { //Remove ending line breaks potentialy added by calls to SMTP::client_send() - $str = preg_replace('/[\r\n]+$/', '', $str); + $str = rtrim($str, "\n\r"); $this->Debugoutput->debug($str); return;