Sending of error email message is optional but enabled.

This commit is contained in:
James Cole
2016-11-12 19:11:59 +01:00
parent 570373e875
commit 64364c3e77
2 changed files with 3 additions and 2 deletions

View File

@@ -35,7 +35,7 @@ MAIL_PASSWORD=null
MAIL_ENCRYPTION=null MAIL_ENCRYPTION=null
SEND_REGISTRATION_MAIL=true SEND_REGISTRATION_MAIL=true
SEND_ERROR_MESSAGE=true
SHOW_INCOMPLETE_TRANSLATIONS=false SHOW_INCOMPLETE_TRANSLATIONS=false
ANALYTICS_ID= ANALYTICS_ID=

View File

@@ -77,7 +77,8 @@ class Handler extends ExceptionHandler
*/ */
public function report(Exception $exception) public function report(Exception $exception)
{ {
if ($exception instanceof FireflyException || $exception instanceof ErrorException) { $doMailError = env('SEND_ERROR_MESSAGE', true);
if (($exception instanceof FireflyException || $exception instanceof ErrorException) && $doMailError) {
$userData = [ $userData = [
'id' => 0, 'id' => 0,
'email' => 'unknown@example.com', 'email' => 'unknown@example.com',