Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Catch error when trying to read (non-existent) logs.
James Colece854fbb43ab
diff --git a/app/Http/Controllers/DebugController.php b/app/Http/Controllers/DebugController.phpindex 3865cb9a7f..ef3aed97e2 100644--- a/app/Http/Controllers/DebugController.php+++ b/app/Http/Controllers/DebugController.php@@ -25,6 +25,7 @@ namespace FireflyIII\Http\Controllers;use Carbon\Carbon;use DB;+use Exception;use FireflyIII\Http\Middleware\IsDemoUser;use Illuminate\Http\Request;use Log;@@ -84,7 +85,11 @@ class DebugController extends Controllerif ($handler instanceof RotatingFileHandler) {$logFile = $handler->getUrl();if (null !== $logFile) {- $logContent = file_get_contents($logFile);+ try {+ $logContent = file_get_contents('/aaaa/'.$logFile);+ } catch(Exception $e) {+ // don't care+ }}}}