Do not send error mails on CLI, instead print debug backtrace

This commit is contained in:
jrenslin authored and Stefan Rohde-Enslin committed 2020-07-21 15:51:07 +02:00
1 parent b6fe734989
commit c61a9e0c5b
1 file changed
+5
+5
View File
@@ -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));
if (PHP_SAPI === 'cli') {
echo $msg;
exit;
}
// Append the contents of $_SERVER
if (!empty($_SERVER)) {
$msg .= $this->_formulateDebugMailSection("The current content of \$_SERVER", $_SERVER);