Skip to content

Firefly III: a personal finances manager

Extra debug info for #2159

James Colee2ebd0171930
diff --git a/app/Http/Controllers/Json/RecurrenceController.php b/app/Http/Controllers/Json/RecurrenceController.php
index cfabc0ff56..d672b01311 100644
--- a/app/Http/Controllers/Json/RecurrenceController.php
+++ b/app/Http/Controllers/Json/RecurrenceController.php
@@ -147,8 +147,9 @@ class RecurrenceController extends Controller
*/
public function suggest(Request $request): JsonResponse
{
+ $string = $request->get('date') ?? date('Y-m-d');
$today = new Carbon;
- $date = Carbon::createFromFormat('Y-m-d', $request->get('date'));
+ $date = Carbon::createFromFormat('Y-m-d', $string);
$preSelected = (string)$request->get('pre_select');
$result = [];
if ($date > $today || 'true' === (string)$request->get('past')) {
diff --git a/app/Support/Amount.php b/app/Support/Amount.php
index 9f9789aa14..797dce4779 100644
--- a/app/Support/Amount.php
+++ b/app/Support/Amount.php
@@ -242,6 +242,7 @@ class Amount
$currencyPreference = Prefs::getForUser($user, 'currencyPreference', config('firefly.default_currency', 'EUR'));
// at this point the currency preference could be encrypted, if coming from an old version.
+ Log::debug('Going to try to decrypt users currency preference.');
$currencyCode = $this->tryDecrypt((string)$currencyPreference->data);
// could still be json encoded:
@@ -288,7 +289,7 @@ class Amount
try {
$value = Crypt::decrypt($value);
} catch (DecryptException $e) {
- Log::debug(sprintf('Could not decrypt. %s', $e->getMessage()));
+ Log::debug(sprintf('Could not decrypt "%s". %s', $value, $e->getMessage()));
}
return $value;
diff --git a/app/Support/Http/Controllers/UserNavigation.php b/app/Support/Http/Controllers/UserNavigation.php
index cac0d91f92..b1ee2cd0e3 100644
--- a/app/Support/Http/Controllers/UserNavigation.php
+++ b/app/Support/Http/Controllers/UserNavigation.php
@@ -147,6 +147,9 @@ trait UserNavigation
$url = app('url')->previous();
session()->put($identifier, $url);
Log::debug(sprintf('Will put previous URI in cache under key %s: %s', $identifier, $url));
+
+ return;
}
+ Log::debug(sprintf('The users session contains errors somehow so we will not remember the URI!: %s', var_export($errors, true)));
}
}