Sophie

Sophie

distrib > Mageia > 6 > armv7hl > media > core-updates-src > by-pkgid > 4fb57b416aafb703ec8723673206556e > files > 2

php-phpmailer-5.2.24-1.1.mga6.src.rpm

From b6316bb5758b5078ab9b0764289e321afd0c5a0d Mon Sep 17 00:00:00 2001
From: Marcus Bointon <marcus@synchromedia.co.uk>
Date: Sat, 4 Nov 2017 10:15:27 +0100
Subject: [PATCH] Switch debug output according to SAPI

---
 class.phpmailer.php | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/class.phpmailer.php b/class.phpmailer.php
index 8042b384..0f5eae58 100644
--- a/class.phpmailer.php
+++ b/class.phpmailer.php
@@ -659,6 +659,8 @@ public function __construct($exceptions = null)
         if ($exceptions !== null) {
             $this->exceptions = (boolean)$exceptions;
         }
+        //Pick an appropriate debug output format automatically
+        $this->Debugoutput = (strpos(PHP_SAPI, 'cli') !== false ? 'echo' : 'html');
     }
 
     /**