From d8fe777b6f68af109a0077a711fdcc8ab37ef583 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Thu, 26 Sep 2024 13:40:52 +0200 Subject: [PATCH] Fix --- src/MTProtoTools/PeerDatabase.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MTProtoTools/PeerDatabase.php b/src/MTProtoTools/PeerDatabase.php index a91eab01c..2c6d61850 100644 --- a/src/MTProtoTools/PeerDatabase.php +++ b/src/MTProtoTools/PeerDatabase.php @@ -315,7 +315,7 @@ final class PeerDatabase implements TLCallback } $result = $this->usernames[$username]; $id = $result === null ? $result : (int) $result; - if (!$this->isset($id)) { + if ($id !== null && !$this->isset($id)) { $this->API->logger("No peer entry for cached username @$username => {$id}, dropping entry!"); unset($this->usernames[$username]); return null;