diff --git a/app/Http/Controllers/Admin/AdminSettingsController.php b/app/Http/Controllers/Admin/AdminSettingsController.php index 6c5f3cd59..9e1a685cd 100644 --- a/app/Http/Controllers/Admin/AdminSettingsController.php +++ b/app/Http/Controllers/Admin/AdminSettingsController.php @@ -27,7 +27,7 @@ trait AdminSettingsController { $editor = config('pixelfed.admin.env_editor'); $config = !$editor ? false : file_get_contents(base_path('.env')); - $backup = !$editor ? false : file_get_contents(base_path('.env.backup')); + $backup = !$editor ? false : (is_file(base_path('.env.backup')) ? file_get_contents(base_path('.env.backup')) : false); return view('admin.settings.config', compact('editor', 'config', 'backup')); }