Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
Synchro committed Apr 8, 2024
1 parent 4102780 commit fb317f2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/PHPMailer.php
Original file line number Diff line number Diff line change
Expand Up @@ -902,7 +902,7 @@ protected function edebug($str)
}
//Is this a PSR-3 logger?
if ($this->Debugoutput instanceof \Psr\Log\LoggerInterface) {
$this->Debugoutput->debug($str);
$this->Debugoutput->debug(rtrim($str, "\r\n"));

return;
}
Expand Down
5 changes: 2 additions & 3 deletions src/SMTP.php
Original file line number Diff line number Diff line change
Expand Up @@ -280,9 +280,8 @@ protected function edebug($str, $level = 0)
}
//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 = rtrim($str, "\n\r");
$this->Debugoutput->debug($str);
//Remove trailing line breaks potentially added by calls to SMTP::client_send()
$this->Debugoutput->debug(rtrim($str, "\r\n"));

return;
}
Expand Down

0 comments on commit fb317f2

Please sign in to comment.