Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Fix #7546
James Colec1114e889ead
diff --git a/app/Http/Controllers/DebugController.php b/app/Http/Controllers/DebugController.phpindex 8f7bf846f5..995bc1fe1a 100644--- a/app/Http/Controllers/DebugController.php+++ b/app/Http/Controllers/DebugController.php@@ -125,16 +125,26 @@ class DebugController extends Controller$baseBuildDate = '(unknown)';$expectedDBversion = config('firefly.db_version');$foundDBversion = FireflyConfig::get('db_version', 1)->data;- if (file_exists('/var/www/counter-main.txt')) {- $buildNr = trim(file_get_contents('/var/www/counter-main.txt'));+ try {+ if (file_exists('/var/www/counter-main.txt')) {+ $buildNr = trim(file_get_contents('/var/www/counter-main.txt'));+ }+ } catch (Exception $e) { // generic catch for open basedir.+ Log::debug('Could not check counter.');+ Log::warning($e->getMessage());}- if (file_exists('/var/www/build-date-main.txt')) {- $buildDate = trim(file_get_contents('/var/www/build-date-main.txt'));+ try {+ if (file_exists('/var/www/build-date-main.txt')) {+ $buildDate = trim(file_get_contents('/var/www/build-date-main.txt'));+ }+ } catch (Exception $e) { // generic catch for open basedir.+ Log::debug('Could not check date.');+ Log::warning($e->getMessage());}- if('' !== (string)env('BASE_IMAGE_BUILD')) {+ if ('' !== (string)env('BASE_IMAGE_BUILD')) {$baseBuildNr = env('BASE_IMAGE_BUILD');}- if('' !== (string)env('BASE_IMAGE_DATE')) {+ if ('' !== (string)env('BASE_IMAGE_DATE')) {$baseBuildDate = env('BASE_IMAGE_DATE');}