Update MTProto.php

This commit is contained in:
Daniil Gentili 2020-09-24 23:46:15 +02:00
parent 50ee77c229
commit 6984893103

View File

@ -497,7 +497,7 @@ class MTProto extends AsyncConstruct implements TLCallback
*/ */
public function serializeSession(object $data): \Generator public function serializeSession(object $data): \Generator
{ {
if ($this->session instanceof MemoryArray) { if (!$this->session || $this->session instanceof MemoryArray) {
return $data; return $data;
} }
yield $this->session['data'] = \serialize($data); yield $this->session['data'] = \serialize($data);