Do not send error mails on CLI, instead print debug backtrace
This commit is contained in:
1 parent
b6fe734989
commit
c61a9e0c5b
1 file changed
+5
@@ -157,6 +157,11 @@ final public function sendDebugMail(string $to, string $subject = "", string $de
|
|||||||
|
|
||||||
$msg .= $this->_formulateDebugMailSection("Debug backtrace", debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT));
|
$msg .= $this->_formulateDebugMailSection("Debug backtrace", debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT));
|
||||||
|
|
||||||
|
if (PHP_SAPI === 'cli') {
|
||||||
|
echo $msg;
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
// Append the contents of $_SERVER
|
// Append the contents of $_SERVER
|
||||||
if (!empty($_SERVER)) {
|
if (!empty($_SERVER)) {
|
||||||
$msg .= $this->_formulateDebugMailSection("The current content of \$_SERVER", $_SERVER);
|
$msg .= $this->_formulateDebugMailSection("The current content of \$_SERVER", $_SERVER);
|
||||||
|
|||||||
Reference in new issue
Block a user