From 0702ea6ec927d9286db867fea8e0da5418cc3835 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Fri, 13 Sep 2019 13:24:54 +0200 Subject: [PATCH] bugfix --- src/danog/MadelineProto/MTProto/TempAuthKey.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/danog/MadelineProto/MTProto/TempAuthKey.php b/src/danog/MadelineProto/MTProto/TempAuthKey.php index 5679679f..97631e5d 100644 --- a/src/danog/MadelineProto/MTProto/TempAuthKey.php +++ b/src/danog/MadelineProto/MTProto/TempAuthKey.php @@ -95,7 +95,7 @@ class TempAuthKey extends AuthKey implements JsonSerializable { $this->bound = $bound; if (!$pfs) { - foreach (['authKey', 'id', 'inited', 'serverSalt'] as $key) { + foreach (['authKey', 'id', 'serverSalt'] as $key) { $this->{$key} = &$bound->{$key}; } } @@ -187,4 +187,13 @@ class TempAuthKey extends AuthKey implements JsonSerializable 'inited' ]; } + /** + * Wakeup function. + * + * @return array + */ + public function __sleep() + { + $this->inited = (bool) $this->inited; + } }