From 123a044e171d26a63c15e2a9761ee07e13eb18cb Mon Sep 17 00:00:00 2001 From: David Bomba Date: Wed, 11 Aug 2021 08:06:43 +1000 Subject: [PATCH] minor fixes --- app/Helpers/Generic.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/Helpers/Generic.php b/app/Helpers/Generic.php index 6c244a278428..5274ca5b2fbd 100644 --- a/app/Helpers/Generic.php +++ b/app/Helpers/Generic.php @@ -33,8 +33,14 @@ function nlog($output, $context = []): void $trace = debug_backtrace(); //nlog( debug_backtrace()[1]['function']); // \Illuminate\Support\Facades\Log::channel('invoiceninja')->info(print_r($trace[1]['class'],1), []); - if(Ninja::isHosted()) - info($output); + if(Ninja::isHosted()) { + try{ + info($output); + } + catch(\Exception $e){ + + } + } else \Illuminate\Support\Facades\Log::channel('invoiceninja')->info($output, $context);