From a42356592e904b40f215c23c6e9f2094f987bd9d Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Sun, 19 Jan 2020 21:04:07 +0300 Subject: [PATCH] Event handler for not authorized sessions --- src/EventObservers/EventHandler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EventObservers/EventHandler.php b/src/EventObservers/EventHandler.php index 6c6e2bf..7272684 100644 --- a/src/EventObservers/EventHandler.php +++ b/src/EventObservers/EventHandler.php @@ -41,7 +41,7 @@ class EventHandler extends \danog\MadelineProto\EventHandler public function onAny($update): void { - $session = Client::getSessionName($this->API->wrapper->session); + $session = Client::getSessionName($this->API->wrapper->session ?? null); Logger::getInstance()->info("Received update from session: {$session}"); foreach (static::$eventListeners as $clientId => $callback) {