mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-30 02:26:58 +00:00
Catch nullpointer
This commit is contained in:
@@ -62,6 +62,10 @@ class AccountTransformer extends AbstractTransformer
|
|||||||
*/
|
*/
|
||||||
public function transform(Account $account): array
|
public function transform(Account $account): array
|
||||||
{
|
{
|
||||||
|
if(null === $account->meta) {
|
||||||
|
$account->meta = [];
|
||||||
|
}
|
||||||
|
|
||||||
// get account type:
|
// get account type:
|
||||||
$accountType = (string) config(sprintf('firefly.shortNamesByFullName.%s', $account->full_account_type));
|
$accountType = (string) config(sprintf('firefly.shortNamesByFullName.%s', $account->full_account_type));
|
||||||
$liabilityType = (string) config(sprintf('firefly.shortLiabilityNameByFullName.%s', $account->full_account_type));
|
$liabilityType = (string) config(sprintf('firefly.shortLiabilityNameByFullName.%s', $account->full_account_type));
|
||||||
|
Reference in New Issue
Block a user