This commit is contained in:
James Cole
2018-03-10 20:25:11 +01:00
parent c8ecb3e0ee
commit 85dc1263ea
2 changed files with 26 additions and 1 deletions

View File

@@ -56,6 +56,16 @@ class TransactionJournalMetaFactory
if ($data['data'] instanceof Carbon) {
$value = $data['data']->toW3cString();
}
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
}
return null;
}
if (null === $entry) {