Update MTProto.php

This commit is contained in:
Daniil Gentili 2020-09-24 23:46:15 +02:00
parent 50ee77c229
commit 6984893103
1 changed files with 1 additions and 1 deletions

View File

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