From 52f6e48abfacaa9a1f20c9209b532a6aec1a3fad Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Sat, 19 Oct 2024 15:02:38 +0000 Subject: [PATCH] Peer database bugfix --- docs | 2 +- schemas | 2 +- src/MTProtoTools/PeerDatabase.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs b/docs index f42967628..a08656066 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit f42967628f037daf1d60faae8049c58da1bd90a3 +Subproject commit a08656066e6ecbe4dc2b3cae13ea457253574974 diff --git a/schemas b/schemas index f0d60e35a..d87084186 160000 --- a/schemas +++ b/schemas @@ -1 +1 @@ -Subproject commit f0d60e35a9566ade2a29cd3e9e7f67f323e9ad4d +Subproject commit d870841861326100fd22281c8a659f5f023d6aeb diff --git a/src/MTProtoTools/PeerDatabase.php b/src/MTProtoTools/PeerDatabase.php index 3bf1a0a08..36c8e45d5 100644 --- a/src/MTProtoTools/PeerDatabase.php +++ b/src/MTProtoTools/PeerDatabase.php @@ -265,7 +265,7 @@ final class PeerDatabase implements TLCallback if (!$this->API->settings->getDb()->getEnableUsernameDb()) { return; } - $new = self::getUsernames($new); + $new = $new ? self::getUsernames($new) : []; $old = $old ? self::getUsernames($old) : []; foreach ($old as $key => $username) { if (!isset($this->usernames[$username])) {