From e2bc3010afc84e5a65cd9daf156c4a9ec2a95bd1 Mon Sep 17 00:00:00 2001 From: netkas Date: Mon, 4 Nov 2024 01:17:47 -0500 Subject: [PATCH] Fix nullable update handling in PollingBot --- src/TgBotLib/PollingBot.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TgBotLib/PollingBot.php b/src/TgBotLib/PollingBot.php index 27b3e63..e9c0f28 100644 --- a/src/TgBotLib/PollingBot.php +++ b/src/TgBotLib/PollingBot.php @@ -234,7 +234,7 @@ foreach ($updates as $update) { // Check if the update contains a command - $command = $update->getAnyMessage()->getCommand(); + $command = $update?->getAnyMessage()?->getCommand(); if ($command !== null) { $commandHandlers = $this->getEventHandlersByCommand($command);