Catch null pointer [skip ci]

This commit is contained in:
James Cole 2018-03-11 08:23:47 +01:00
parent 7d6c8aa9dc
commit 9e6194bfdc
No known key found for this signature in database
GPG Key ID: C16961E655E74B5E

View File

@ -58,8 +58,12 @@ class TransactionJournal extends Twig_Extension
{
/** @var JournalRepositoryInterface $repository */
$repository = app(JournalRepositoryInterface::class);
$result = $repository->getMetaField($journal, $field);
if (is_null($result)) {
return '';
}
return $repository->getMetaField($journal, $field);
return $result;
}
/**