diff --git a/src/MessageProcessors/Mqtt311MessageProcessor.php b/src/MessageProcessors/Mqtt311MessageProcessor.php index 9148ab3..6a792f8 100644 --- a/src/MessageProcessors/Mqtt311MessageProcessor.php +++ b/src/MessageProcessors/Mqtt311MessageProcessor.php @@ -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())