diff --git a/src/danog/MadelineProto/MTProtoTools/PeerHandler.php b/src/danog/MadelineProto/MTProtoTools/PeerHandler.php index 8a6bfed3..0da01421 100644 --- a/src/danog/MadelineProto/MTProtoTools/PeerHandler.php +++ b/src/danog/MadelineProto/MTProtoTools/PeerHandler.php @@ -296,7 +296,9 @@ trait PeerHandler switch ($partial['type']) { case 'user': case 'bot': - if (!isset($partial['InputUser'])) throw new \danog\MadelineProto\Exception('This peer is not present in the internal peer database'); + if (!isset($partial['InputUser'])) { + throw new \danog\MadelineProto\Exception('This peer is not present in the internal peer database'); + } $full = $this->method_call('users.getFullUser', ['id' => $partial['InputUser']], ['datacenter' => $this->datacenter->curdc]); break; diff --git a/src/danog/MadelineProto/MTProtoTools/UpdateHandler.php b/src/danog/MadelineProto/MTProtoTools/UpdateHandler.php index 4d8a32ae..9def66bd 100644 --- a/src/danog/MadelineProto/MTProtoTools/UpdateHandler.php +++ b/src/danog/MadelineProto/MTProtoTools/UpdateHandler.php @@ -138,7 +138,9 @@ trait UpdateHandler } try { $input = $this->get_info('channel#'.$channel); - if (!isset($input['InputChannel'])) throw new \danog\MadelineProto\Exception('This peer is not present in the internal peer database'); + if (!isset($input['InputChannel'])) { + throw new \danog\MadelineProto\Exception('This peer is not present in the internal peer database'); + } $input = $input['InputChannel']; } catch (\danog\MadelineProto\Exception $e) { return false; diff --git a/src/danog/MadelineProto/SecretChats/AuthKeyHandler.php b/src/danog/MadelineProto/SecretChats/AuthKeyHandler.php index d689d744..96409654 100644 --- a/src/danog/MadelineProto/SecretChats/AuthKeyHandler.php +++ b/src/danog/MadelineProto/SecretChats/AuthKeyHandler.php @@ -45,7 +45,9 @@ trait AuthKeyHandler { $this->should_serialize = true; $user = $this->get_info($user); - if (!isset($user['InputUser'])) throw new \danog\MadelineProto\Exception('This peer is not present in the internal peer database'); + if (!isset($user['InputUser'])) { + throw new \danog\MadelineProto\Exception('This peer is not present in the internal peer database'); + } $user = $user['InputUser']; \danog\MadelineProto\Logger::log(['Creating secret chat with '.$user['user_id'].'...'], \danog\MadelineProto\Logger::VERBOSE); $dh_config = $this->get_dh_config(); diff --git a/src/danog/MadelineProto/VoIP/AuthKeyHandler.php b/src/danog/MadelineProto/VoIP/AuthKeyHandler.php index 831c391d..fbe2b1c9 100644 --- a/src/danog/MadelineProto/VoIP/AuthKeyHandler.php +++ b/src/danog/MadelineProto/VoIP/AuthKeyHandler.php @@ -30,7 +30,9 @@ trait AuthKeyHandler public function request_call($user) { $user = $this->get_info($user); - if (!isset($user['InputUser'])) throw new \danog\MadelineProto\Exception('This peer is not present in the internal peer database'); + if (!isset($user['InputUser'])) { + throw new \danog\MadelineProto\Exception('This peer is not present in the internal peer database'); + } $user = $user['InputUser']; \danog\MadelineProto\Logger::log(['Calling '.$user['user_id'].'...'], \danog\MadelineProto\Logger::VERBOSE); $dh_config = $this->get_dh_config();