diff --git a/src/danog/MadelineProto/CombinedAPI.php b/src/danog/MadelineProto/CombinedAPI.php index 6dc38ee3..d73edb9b 100644 --- a/src/danog/MadelineProto/CombinedAPI.php +++ b/src/danog/MadelineProto/CombinedAPI.php @@ -60,7 +60,10 @@ class CombinedAPI $this->event_handler = $deserialized['event_handler']; $this->event_handler_instance = $deserialized['event_handler_instance']; - $this->setEventHandler($this->event_handler); + + if ($this->event_handler !== null) { + $this->setEventHandler($this->event_handler); + } } foreach ($paths as $path => $settings) { $this->addInstance($path, $settings);