Extra debug info for #2159

This commit is contained in:
James Cole
2019-03-16 20:07:26 +01:00
parent b8ac7c9d89
commit e2ebd01719
3 changed files with 7 additions and 2 deletions

View File

@@ -147,8 +147,9 @@ class RecurrenceController extends Controller
*/ */
public function suggest(Request $request): JsonResponse public function suggest(Request $request): JsonResponse
{ {
$string = $request->get('date') ?? date('Y-m-d');
$today = new Carbon; $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'); $preSelected = (string)$request->get('pre_select');
$result = []; $result = [];
if ($date > $today || 'true' === (string)$request->get('past')) { if ($date > $today || 'true' === (string)$request->get('past')) {

View File

@@ -242,6 +242,7 @@ class Amount
$currencyPreference = Prefs::getForUser($user, 'currencyPreference', config('firefly.default_currency', 'EUR')); $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. // 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); $currencyCode = $this->tryDecrypt((string)$currencyPreference->data);
// could still be json encoded: // could still be json encoded:
@@ -288,7 +289,7 @@ class Amount
try { try {
$value = Crypt::decrypt($value); $value = Crypt::decrypt($value);
} catch (DecryptException $e) { } 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; return $value;

View File

@@ -147,6 +147,9 @@ trait UserNavigation
$url = app('url')->previous(); $url = app('url')->previous();
session()->put($identifier, $url); session()->put($identifier, $url);
Log::debug(sprintf('Will put previous URI in cache under key %s: %s', $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)));
} }
} }