From b4d9fa69afd037e0efb54a72767e8fc2dde3eb66 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Wed, 6 Dec 2023 21:25:23 +0100 Subject: [PATCH] Minor fixes --- docs | 2 +- examples/secret_bot.php | 2 +- src/MTProtoTools/UpdateHandler.php | 2 +- tests/dockerfiles/php.ini | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs b/docs index b5aa55944..30592a1f8 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit b5aa55944beab3de3384a300fdcc5c629557fd83 +Subproject commit 30592a1f89afc48af05d1898acec1cd03d1997ee diff --git a/examples/secret_bot.php b/examples/secret_bot.php index 35af0d3ff..a816674ab 100755 --- a/examples/secret_bot.php +++ b/examples/secret_bot.php @@ -67,7 +67,7 @@ class SecretHandler extends SimpleEventHandler $this->requestSecretChat($update); } if (($update['message']['message'] ?? '') === 'ping') { - $this->messages->sendMessage(['message' => 'pong', 'peer' => $update]); + $this->messages->sendMessage(message: 'pong', peer: $update); } } /** diff --git a/src/MTProtoTools/UpdateHandler.php b/src/MTProtoTools/UpdateHandler.php index 59215d48f..d460845d7 100644 --- a/src/MTProtoTools/UpdateHandler.php +++ b/src/MTProtoTools/UpdateHandler.php @@ -1037,7 +1037,7 @@ trait UpdateHandler } catch (RPCErrorException $e) { if ($e->rpc === 'SESSION_PASSWORD_NEEDED') { $this->logger->logger(Lang::$current_lang['login_2fa_enabled'], Logger::NOTICE); - $this->authorization = $this->methodCallAsyncRead('account.getPassword', [], $datacenter); + $this->authorization = $this->methodCallAsyncRead('account.getPassword', [], $datacenter ?? null); if (!isset($this->authorization['hint'])) { $this->authorization['hint'] = ''; } diff --git a/tests/dockerfiles/php.ini b/tests/dockerfiles/php.ini index 3038d5755..e058ed12d 100644 --- a/tests/dockerfiles/php.ini +++ b/tests/dockerfiles/php.ini @@ -1,5 +1,5 @@ memory_limit = -1 -zend.assertions = 1 +;zend.assertions = 1 display_errors = On display_startup_errors = On