Skip to content

Commit

Permalink
Fix: Allow isPublishMessageWithNullCharacter to receive messages as n…
Browse files Browse the repository at this point in the history
…ull (#162)
  • Loading branch information
DavidCova committed Aug 10, 2023
1 parent 0e91553 commit 92e348d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/MessageProcessors/Mqtt311MessageProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ protected function parseAndValidateSubscribeAcknowledgementMessage(string $data)
/**
* Determines if the given message is a PUBLISH message and contains the unicode null character U+0000.
*
* @param Message $message
* @param Message|null $message
* @return bool
*/
private function isPublishMessageWithNullCharacter(Message $message): bool
private function isPublishMessageWithNullCharacter(?Message $message): bool
{
return $message !== null
&& $message->getType()->equals(MessageType::PUBLISH())
Expand Down

0 comments on commit 92e348d

Please sign in to comment.