From df33c89c5ba677d9e07b676ea9b222b24f7c5934 Mon Sep 17 00:00:00 2001 From: Alexis Urien Date: Mon, 8 Apr 2024 08:40:09 -0700 Subject: [PATCH] Remove potential ending line break when using edebug() with LoggerInterface --- src/SMTP.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/SMTP.php b/src/SMTP.php index 7c8520a5..4015bb4b 100644 --- a/src/SMTP.php +++ b/src/SMTP.php @@ -280,6 +280,8 @@ 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('/[' . static::LE .']+$/', '', $str); $this->Debugoutput->debug($str); return;