From bcc493b7a5e5454f1aaadd6da4144e40ff487913 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Sat, 19 Oct 2024 15:03:50 +0000 Subject: [PATCH] Peer database bugfix --- 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 2c6d61850..80fc167be 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) : []; $diffToRemove = array_diff($old, $new); $diffToAdd = array_diff($new, $old);