Skip to content

Commit

Permalink
Merge pull request #8 from jobilla/master
Browse files Browse the repository at this point in the history
Fix exception when no proto
  • Loading branch information
phroggyy authored Mar 31, 2022
2 parents 95618a2 + 265725d commit 7bc2624
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/AppEventFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ protected static function resolveProtobufInstance(Message $message): ProtobufMes
$rawData = json_decode($message->data(), JSON_OBJECT_AS_ARRAY);

if (! isset($rawData['proto']) || ! ($protobufClass = Config::get('app-events.mappings.'.$rawData['proto']))) {
throw new UnserializableProtoException($rawData['proto']);
throw new UnserializableProtoException($rawData['proto'] ?? 'ProtoUnknown');
}

/** @var ProtobufMessage $proto */
Expand Down

0 comments on commit 7bc2624

Please sign in to comment.