mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Include safe methods and require the correct package.
This commit is contained in:
@@ -284,7 +284,7 @@ class PiggyBankFactory
|
||||
Log::debug(sprintf('Will link account #%d with info: ', $account->id), $toBeLinked[$account->id]);
|
||||
}
|
||||
}
|
||||
Log::debug(sprintf('Link information: %s', json_encode($toBeLinked)));
|
||||
Log::debug(sprintf('Link information: %s', \Safe\json_encode($toBeLinked)));
|
||||
if (0 !== count($toBeLinked)) {
|
||||
$piggyBank->accounts()->sync($toBeLinked);
|
||||
}
|
||||
|
@@ -323,7 +323,7 @@ class TransactionJournalFactory
|
||||
unset($dataRow['import_hash_v2'], $dataRow['original_source']);
|
||||
|
||||
try {
|
||||
$json = json_encode($dataRow, JSON_THROW_ON_ERROR);
|
||||
$json = \Safe\json_encode($dataRow, JSON_THROW_ON_ERROR);
|
||||
} catch (\JsonException $e) {
|
||||
Log::error(sprintf('Could not encode dataRow: %s', $e->getMessage()));
|
||||
$json = microtime();
|
||||
@@ -352,7 +352,7 @@ class TransactionJournalFactory
|
||||
->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'journal_meta.transaction_journal_id')
|
||||
->whereNotNull('transaction_journals.id')
|
||||
->where('transaction_journals.user_id', $this->user->id)
|
||||
->where('data', json_encode($hash, JSON_THROW_ON_ERROR))
|
||||
->where('data', \Safe\json_encode($hash, JSON_THROW_ON_ERROR))
|
||||
->with(['transactionJournal', 'transactionJournal.transactionGroup'])
|
||||
->first(['journal_meta.*'])
|
||||
;
|
||||
|
Reference in New Issue
Block a user