From cf456dbeb726e4a042619badb0807eaa6cfcae56 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Mon, 13 May 2019 01:00:22 +0200 Subject: [PATCH] Updates fix --- src/danog/MadelineProto/MTProto.php | 2 +- src/danog/MadelineProto/MTProtoTools/CombinedUpdatesState.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/danog/MadelineProto/MTProto.php b/src/danog/MadelineProto/MTProto.php index f4c532c6..9b8f102c 100644 --- a/src/danog/MadelineProto/MTProto.php +++ b/src/danog/MadelineProto/MTProto.php @@ -387,7 +387,7 @@ class MTProto implements TLCallback } if (!$this->settings['updates']['handle_old_updates']) { - $this->channels_state = []; + $this->channels_state = new CombinedUpdatesState(); $this->got_state = false; } yield $this->connect_to_all_dcs_async(); diff --git a/src/danog/MadelineProto/MTProtoTools/CombinedUpdatesState.php b/src/danog/MadelineProto/MTProtoTools/CombinedUpdatesState.php index 4d7a6d38..889d6c03 100644 --- a/src/danog/MadelineProto/MTProtoTools/CombinedUpdatesState.php +++ b/src/danog/MadelineProto/MTProtoTools/CombinedUpdatesState.php @@ -25,7 +25,7 @@ namespace danog\MadelineProto\MTProtoTools; class CombinedUpdatesState { private $states = []; - public function __construct($init) + public function __construct($init = []) { if (!is_array($init)) { return;