Skip to content

Firefly III: a personal finances manager

update issue templates.

James Cole84bdd4710942
diff --git a/.github/ISSUE_TEMPLATE/Bug_report.md b/.github/ISSUE_TEMPLATE/Bug_report.md
index f8f985bebf..8ca171ab64 100644
--- a/.github/ISSUE_TEMPLATE/Bug_report.md
+++ b/.github/ISSUE_TEMPLATE/Bug_report.md
@@ -19,7 +19,7 @@ I am running Firefly III version x.x.x, and my problem is:
<!-- Earn bonus points by checking the boxes -->
- [ ] Nobody reported this bug before
-- [ ] I have added a stack trace from my log files.
+- [ ] I have added a stack trace from my log files <!-- (see https://bit.ly/FF3-get-debug-info) -->
- [ ] I have added a screenshot.
- [ ] I was able to replicate it on the demo site https://demo.firefly-iii.org/
<!-- - [ ] I donated money (this is a joke :wink:)-->
diff --git a/.github/ISSUE_TEMPLATE/Custom.md b/.github/ISSUE_TEMPLATE/Custom.md
index 90cbcaf332..550e015f23 100644
--- a/.github/ISSUE_TEMPLATE/Custom.md
+++ b/.github/ISSUE_TEMPLATE/Custom.md
@@ -18,6 +18,6 @@ I am running Firefly III version x.x.x.
- [ ] I have read the FAQ at https://bit.ly/FF3-FAQ
- [ ] I added a screenshot
-- [ ] I added log files (see https://bit.ly/FF3-get-logs)
+- [ ] I added log files <!-- (see https://bit.ly/FF3-get-debug-info) -->
- [ ] I was able to replicate the issue on the demo site.
<!-- - [ ] I donated money (this is a joke :wink:)-->
diff --git a/app/Console/Commands/Export/ExportData.php b/app/Console/Commands/Export/ExportData.php
index 89ac2abdb7..4ecf0cb1ee 100644
--- a/app/Console/Commands/Export/ExportData.php
+++ b/app/Console/Commands/Export/ExportData.php
@@ -238,11 +238,12 @@ class ExportData extends Command
/**
* @throws FireflyException
+ *
* @return string
*/
private function getExportDirectory(): string
{
- $directory = $this->option('export_directory');
+ $directory = (string) $this->option('export_directory');
if (null === $directory) {
$directory = './';
}
diff --git a/app/Exceptions/GracefulNotFoundHandler.php b/app/Exceptions/GracefulNotFoundHandler.php
index 6c4ed1d45a..9169e2c67e 100644
--- a/app/Exceptions/GracefulNotFoundHandler.php
+++ b/app/Exceptions/GracefulNotFoundHandler.php
@@ -50,6 +50,7 @@ class GracefulNotFoundHandler extends ExceptionHandler
* @param Request $request
* @param Exception $exception
*
+ * @throws Exception
* @return mixed
*/
public function render($request, Exception $exception)
@@ -137,9 +138,10 @@ class GracefulNotFoundHandler extends ExceptionHandler
* @param Request $request
* @param Exception $exception
*
- * @return \Illuminate\Http\Response|Response
+ * @throws Exception
+ * @return Redirector|Response
*/
- private function handleAccount($request, Exception $exception)
+ private function handleAccount(Request $request, Exception $exception)
{
Log::debug('404 page is probably a deleted account. Redirect to overview of account types.');
/** @var User $user */
@@ -160,6 +162,13 @@ class GracefulNotFoundHandler extends ExceptionHandler
return redirect(route('accounts.index', [$shortType]));
}
+ /**
+ * @param Request $request
+ * @param Exception $exception
+ *
+ * @throws Exception
+ * @return RedirectResponse|Redirector|Response
+ */
private function handleAttachment(Request $request, Exception $exception)
{
Log::debug('404 page is probably a deleted attachment. Redirect to parent object.');
@@ -199,12 +208,13 @@ class GracefulNotFoundHandler extends ExceptionHandler
}
/**
- * @param $request
+ * @param Request $request
* @param Exception $exception
*
+ * @throws Exception
* @return RedirectResponse|\Illuminate\Http\Response|Redirector|Response
*/
- private function handleGroup($request, Exception $exception)
+ private function handleGroup(Request $request, Exception $exception)
{
Log::debug('404 page is probably a deleted group. Redirect to overview of group types.');
/** @var User $user */
diff --git a/app/Factory/TransactionJournalFactory.php b/app/Factory/TransactionJournalFactory.php
index 6c8aca89f5..98034be969 100644
--- a/app/Factory/TransactionJournalFactory.php
+++ b/app/Factory/TransactionJournalFactory.php
@@ -470,7 +470,7 @@ class TransactionJournalFactory
// return user's default:
return app('amount')->getDefaultCurrencyByUser($this->user);
}
- $result = $preference ?? $currency;
+ $result = ($preference ?? $currency) ?? app('amount')->getSystemCurrency();
Log::debug(sprintf('Currency is now #%d (%s) because of account #%d (%s)', $result->id, $result->code, $account->id, $account->name));
return $result;