mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-10-13 17:02:06 -05:00
Fix null pointer.
This commit is contained in:
4 files changed
+10
-15
No files matched your search
@@ -58,10 +58,12 @@ class TransactionJournalMetaFactory
|
||||
}
|
||||
if (strlen($value) === 0) {
|
||||
// don't store blank strings.
|
||||
try {
|
||||
$entry->delete();
|
||||
} catch (Exception $e) { // @codeCoverageIgnore
|
||||
Log::error(sprintf('Could not delete transaction journal meta: %s', $e->getMessage())); // @codeCoverageIgnore
|
||||
if (!is_null($entry)) {
|
||||
try {
|
||||
$entry->delete();
|
||||
} catch (Exception $e) { // @codeCoverageIgnore
|
||||
Log::error(sprintf('Could not delete transaction journal meta: %s', $e->getMessage())); // @codeCoverageIgnore
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
Reference in new issue
Block a user