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

This commit is contained in:
Joshua Ramon Enslin 2020-07-21 15:51:07 +02:00 committed by Stefan Rohde-Enslin
parent b6fe734989
commit c61a9e0c5b

View File

@ -157,6 +157,11 @@ class MDErrorReporter {
$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);