Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
danog committed Dec 6, 2023
1 parent 64b20ea commit b4d9fa6
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs
2 changes: 1 addition & 1 deletion examples/secret_bot.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function onUpdateNewMessage(array $update): void
$this->requestSecretChat($update);
}
if (($update['message']['message'] ?? '') === 'ping') {
$this->messages->sendMessage(['message' => 'pong', 'peer' => $update]);
$this->messages->sendMessage(message: 'pong', peer: $update);
}
}
/**
Expand Down
2 changes: 1 addition & 1 deletion src/MTProtoTools/UpdateHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -1037,7 +1037,7 @@ public function saveUpdate(array $update): void
} 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'] = '';
}
Expand Down
2 changes: 1 addition & 1 deletion tests/dockerfiles/php.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
memory_limit = -1
zend.assertions = 1
;zend.assertions = 1
display_errors = On
display_startup_errors = On

Expand Down

0 comments on commit b4d9fa6

Please sign in to comment.