Learned that I should not refer to env vars directly so I removed all references.

This commit is contained in:
James Cole
2018-12-15 07:59:02 +01:00
parent 4bd94e5450
commit c54541b839
116 changed files with 239 additions and 157 deletions

View File

@@ -38,6 +38,7 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/**
* Class Handler
*
* @codeCoverageIgnore
*/
class Handler extends ExceptionHandler
@@ -92,7 +93,7 @@ class Handler extends ExceptionHandler
}
if ($exception instanceof FireflyException || $exception instanceof ErrorException || $exception instanceof OAuthServerException) {
$isDebug = env('APP_DEBUG', false);
$isDebug = config('app.debug');
return response()->view('errors.FireflyException', ['exception' => $exception, 'debug' => $isDebug], 500);
}
@@ -116,7 +117,7 @@ class Handler extends ExceptionHandler
public function report(Exception $exception)
{
$doMailError = env('SEND_ERROR_MESSAGE', true);
$doMailError = config('firefly.send_error_message');
// if the user wants us to mail:
if (true === $doMailError
// and if is one of these error instances
@@ -145,7 +146,7 @@ class Handler extends ExceptionHandler
// create job that will mail.
$ipAddress = Request::ip() ?? '0.0.0.0';
$job = new MailError($userData, env('SITE_OWNER', ''), $ipAddress, $data);
$job = new MailError($userData, (string)config('firefly.site_owner'), $ipAddress, $data);
dispatch($job);
}