mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Remove safe methods.
This commit is contained in:
@@ -99,7 +99,7 @@ class UpdateRequest implements UpdateRequestInterface
|
||||
$body = (string) $res->getBody();
|
||||
|
||||
try {
|
||||
$json = \Safe\json_decode($body, true, 512, JSON_THROW_ON_ERROR);
|
||||
$json = json_decode($body, true, 512, JSON_THROW_ON_ERROR);
|
||||
} catch (\JsonException) {
|
||||
Log::error('Body is not valid JSON');
|
||||
Log::error($body);
|
||||
|
@@ -260,7 +260,7 @@ trait JournalServiceTrait
|
||||
if (null === $account) {
|
||||
// final attempt, create it.
|
||||
if (AccountTypeEnum::ASSET->value === $preferredType) {
|
||||
throw new FireflyException(sprintf('TransactionFactory: Cannot create asset account with these values: %s', \Safe\json_encode($data)));
|
||||
throw new FireflyException(sprintf('TransactionFactory: Cannot create asset account with these values: %s', json_encode($data)));
|
||||
}
|
||||
// fix name of account if only IBAN is given:
|
||||
if ('' === (string) $data['name'] && '' !== (string) $data['iban']) {
|
||||
|
@@ -307,9 +307,9 @@ trait RecurringTransactionTrait
|
||||
/** @var null|RecurrenceMeta $entry */
|
||||
$entry = $transaction->recurrenceTransactionMeta()->where('name', 'tags')->first();
|
||||
if (null === $entry) {
|
||||
$entry = RecurrenceTransactionMeta::create(['rt_id' => $transaction->id, 'name' => 'tags', 'value' => \Safe\json_encode($tags)]);
|
||||
$entry = RecurrenceTransactionMeta::create(['rt_id' => $transaction->id, 'name' => 'tags', 'value' => json_encode($tags)]);
|
||||
}
|
||||
$entry->value = \Safe\json_encode($tags);
|
||||
$entry->value = json_encode($tags);
|
||||
$entry->save();
|
||||
}
|
||||
if (0 === count($tags)) {
|
||||
|
@@ -80,7 +80,7 @@ class StandardWebhookSender implements WebhookSenderInterface
|
||||
app('log')->debug(sprintf('Trying to send webhook message #%d', $this->message->id));
|
||||
|
||||
try {
|
||||
$json = \Safe\json_encode($this->message->message, JSON_THROW_ON_ERROR);
|
||||
$json = json_encode($this->message->message, JSON_THROW_ON_ERROR);
|
||||
} catch (\JsonException $e) {
|
||||
app('log')->error('Did not send message because of a JSON error.');
|
||||
app('log')->error($e->getMessage());
|
||||
|
Reference in New Issue
Block a user