mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-11-30 12:43:57 -06:00
Fix null pointers.
This commit is contained in:
parent
39cdbc461e
commit
19a428bf2d
@ -386,7 +386,7 @@ trait TransactionValidation
|
||||
$data = $validator->getData();
|
||||
$transactions = $data['transactions'] ?? [];
|
||||
|
||||
if (!is_countable($data['transactions'])) {
|
||||
if (!is_countable($transactions)) {
|
||||
$validator->errors()->add(
|
||||
'transactions.0.description', (string)trans('validation.filled', ['attribute' => (string)trans('validation.attributes.description')])
|
||||
);
|
||||
@ -436,7 +436,7 @@ trait TransactionValidation
|
||||
$data = $validator->getData();
|
||||
$transactions = $data['transactions'] ?? [];
|
||||
|
||||
if (!is_countable($data['transactions'])) {
|
||||
if (!is_countable($transactions)) {
|
||||
$validator->errors()->add(
|
||||
'transactions.0.description', (string)trans('validation.filled', ['attribute' => (string)trans('validation.attributes.description')])
|
||||
);
|
||||
@ -528,7 +528,7 @@ trait TransactionValidation
|
||||
$data = $validator->getData();
|
||||
$transactions = $data['transactions'] ?? [];
|
||||
|
||||
if (!is_countable($data['transactions'])) {
|
||||
if (!is_countable($transactions)) {
|
||||
$validator->errors()->add(
|
||||
'transactions.0.description', (string)trans('validation.filled', ['attribute' => (string)trans('validation.attributes.description')])
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user