diff --git a/docs b/docs index 2afa14cd2..e83c3ea02 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 2afa14cd21754fbbcbc8bd25cecfeb3592662eca +Subproject commit e83c3ea026fc2142b6558378d0c9636c8c29f248 diff --git a/schemas b/schemas index d0b2b612c..8fd40f0a4 160000 --- a/schemas +++ b/schemas @@ -1 +1 @@ -Subproject commit d0b2b612cbece1fd3dc971634326f7470dc0099b +Subproject commit 8fd40f0a4170769465e4943e4a5da37bd58f7e88 diff --git a/src/danog/MadelineProto/Db/SqlArray.php b/src/danog/MadelineProto/Db/SqlArray.php index 02468dd54..9092688b5 100644 --- a/src/danog/MadelineProto/Db/SqlArray.php +++ b/src/danog/MadelineProto/Db/SqlArray.php @@ -85,7 +85,7 @@ abstract class SqlArray extends DriverArray */ public function isset($key): Promise { - return call(fn () => yield $this->offsetGet($key) !== null); + return call(fn () => null !== yield $this->offsetGet($key)); } diff --git a/src/danog/MadelineProto/MTProto.php b/src/danog/MadelineProto/MTProto.php index 756f2ebbb..6a46e6399 100644 --- a/src/danog/MadelineProto/MTProto.php +++ b/src/danog/MadelineProto/MTProto.php @@ -746,7 +746,7 @@ class MTProto extends AsyncConstruct implements TLCallback yield $this->usernames->clear(); return; } - if (yield $this->usernames->count() === 0) { + if (!yield $this->usernames->count()) { $this->logger('Filling database cache. This can take few minutes.', Logger::WARNING); $iterator = $this->chats->getIterator(); while (yield $iterator->advance()) { diff --git a/src/danog/MadelineProto/MTProtoTools/MinDatabase.php b/src/danog/MadelineProto/MTProtoTools/MinDatabase.php index 000c9d7e8..c9bb63914 100644 --- a/src/danog/MadelineProto/MTProtoTools/MinDatabase.php +++ b/src/danog/MadelineProto/MTProtoTools/MinDatabase.php @@ -84,7 +84,7 @@ class MinDatabase implements TLCallback if (!$this->API->getSettings()->getDb()->getEnableMinDb()) { yield $this->db->clear(); } - if ($this->clean || yield $this->db->count() === 0) { + if ($this->clean || 0 === yield $this->db->count()) { $this->clean = true; return; }