mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-16 22:58:09 +00:00
Fix nullpointers.
This commit is contained in:
@@ -35,6 +35,7 @@ use Illuminate\Session\TokenMismatchException;
|
|||||||
use Illuminate\Support\Arr;
|
use Illuminate\Support\Arr;
|
||||||
use Illuminate\Validation\ValidationException as LaravelValidationException;
|
use Illuminate\Validation\ValidationException as LaravelValidationException;
|
||||||
use League\OAuth2\Server\Exception\OAuthServerException;
|
use League\OAuth2\Server\Exception\OAuthServerException;
|
||||||
|
use Laravel\Passport\Exceptions\OAuthServerException as LaravelOAuthException;
|
||||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||||
use Throwable;
|
use Throwable;
|
||||||
|
|
||||||
@@ -54,6 +55,7 @@ class Handler extends ExceptionHandler
|
|||||||
LaravelValidationException::class,
|
LaravelValidationException::class,
|
||||||
NotFoundHttpException::class,
|
NotFoundHttpException::class,
|
||||||
OAuthServerException::class,
|
OAuthServerException::class,
|
||||||
|
LaravelOAuthException::class,
|
||||||
TokenMismatchException::class,
|
TokenMismatchException::class,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ class EditController extends Controller
|
|||||||
$repetition = $recurrence->recurrenceRepetitions()->first();
|
$repetition = $recurrence->recurrenceRepetitions()->first();
|
||||||
$currentRepType = $repetition->repetition_type;
|
$currentRepType = $repetition->repetition_type;
|
||||||
if ('' !== $repetition->repetition_moment) {
|
if ('' !== $repetition->repetition_moment) {
|
||||||
$currentRepType .= ',' . $repetition->repetition_moment;
|
$currentRepType .= ',' . $repetition->repetition_moment;
|
||||||
}
|
}
|
||||||
|
|
||||||
// put previous url in session if not redirect from store (not "return_to_edit").
|
// put previous url in session if not redirect from store (not "return_to_edit").
|
||||||
@@ -119,10 +119,10 @@ class EditController extends Controller
|
|||||||
'times' => (string)trans('firefly.repeat_times'),
|
'times' => (string)trans('firefly.repeat_times'),
|
||||||
];
|
];
|
||||||
if (null !== $recurrence->repeat_until) {
|
if (null !== $recurrence->repeat_until) {
|
||||||
$repetitionEnd = 'until_date';
|
$repetitionEnd = 'until_date';
|
||||||
}
|
}
|
||||||
if ($recurrence->repetitions > 0) {
|
if ($recurrence->repetitions > 0) {
|
||||||
$repetitionEnd = 'times';
|
$repetitionEnd = 'times';
|
||||||
}
|
}
|
||||||
|
|
||||||
$weekendResponses = [
|
$weekendResponses = [
|
||||||
@@ -140,7 +140,7 @@ class EditController extends Controller
|
|||||||
'deposit_source_id' => $array['transactions'][0]['source_id'],
|
'deposit_source_id' => $array['transactions'][0]['source_id'],
|
||||||
'withdrawal_destination_id' => $array['transactions'][0]['destination_id'],
|
'withdrawal_destination_id' => $array['transactions'][0]['destination_id'],
|
||||||
];
|
];
|
||||||
$array['first_date'] = substr($array['first_date'], 0, 10);
|
$array['first_date'] = substr((string)$array['first_date'], 0, 10);
|
||||||
$array['repeat_until'] = substr((string)$array['repeat_until'], 0, 10);
|
$array['repeat_until'] = substr((string)$array['repeat_until'], 0, 10);
|
||||||
$array['transactions'][0]['tags'] = implode(',', $array['transactions'][0]['tags'] ?? []);
|
$array['transactions'][0]['tags'] = implode(',', $array['transactions'][0]['tags'] ?? []);
|
||||||
|
|
||||||
@@ -177,7 +177,7 @@ class EditController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (count($this->attachments->getMessages()->get('attachments')) > 0) {
|
if (count($this->attachments->getMessages()->get('attachments')) > 0) {
|
||||||
$request->session()->flash('info', $this->attachments->getMessages()->get('attachments'));
|
$request->session()->flash('info', $this->attachments->getMessages()->get('attachments'));
|
||||||
}
|
}
|
||||||
app('preferences')->mark();
|
app('preferences')->mark();
|
||||||
$redirect = redirect($this->getPreviousUri('recurrences.edit.uri'));
|
$redirect = redirect($this->getPreviousUri('recurrences.edit.uri'));
|
||||||
|
|||||||
@@ -35,6 +35,9 @@ class EitherConfigKey
|
|||||||
'firefly.default_location',
|
'firefly.default_location',
|
||||||
'firefly.account_to_transaction',
|
'firefly.account_to_transaction',
|
||||||
'firefly.allowed_opposing_types',
|
'firefly.allowed_opposing_types',
|
||||||
|
'firefly.accountRoles',
|
||||||
|
'firefly.valid_liabilities',
|
||||||
|
'firefly.interest_periods'
|
||||||
];
|
];
|
||||||
/**
|
/**
|
||||||
* @param string $value
|
* @param string $value
|
||||||
|
|||||||
Reference in New Issue
Block a user