Skip to content

Commit

Permalink
Merge pull request #22 from digitalrisks/fix-null-metadata
Browse files Browse the repository at this point in the history
fix: cater for null metadata throwing type exception
  • Loading branch information
eithed authored Nov 8, 2019
2 parents 747421a + 94ab94b commit 45c2bb8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Console/Commands/EventStoreWorker.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ protected function dumpEvent(EventRecord $event)
protected function safeGetMetadata(EventRecord $event)
{
try {
return $event->getMetadata();
return $event->getMetadata() ?? [];
} catch (TypeError $e) {
return [];
}
Expand Down

0 comments on commit 45c2bb8

Please sign in to comment.