1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-11-30 06:59:01 +01:00

Wait for init before serializing

This commit is contained in:
Daniil Gentili 2024-04-07 14:59:47 +02:00
parent 7aab98053c
commit 25c39d238a

View File

@ -410,6 +410,7 @@ final class MTProto implements TLCallback, LoggerGetter, SettingsGetter
*/
public function serializeSession(object $data)
{
$this->waitForInit();
/** @psalm-suppress TypeDoesNotContainType */
if (!isset($this->sessionDb) || $this->sessionDb instanceof MemoryArray) {
return $data;