Fix null pointers.

This commit is contained in:
James Cole 2020-02-14 13:14:06 +01:00
parent 39cdbc461e
commit 19a428bf2d
No known key found for this signature in database
GPG Key ID: C16961E655E74B5E

View File

@ -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')])
);