From 8ddc8237e52a3a06e107cd35210635b4d71d99a1 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Mon, 8 Aug 2016 13:08:42 -0400 Subject: [PATCH] Applied fixes from StyleCI --- src/danog/MadelineProto/Session.php | 4 ++-- src/danog/MadelineProto/TL/TL.php | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/danog/MadelineProto/Session.php b/src/danog/MadelineProto/Session.php index fcb59825..b65dff03 100755 --- a/src/danog/MadelineProto/Session.php +++ b/src/danog/MadelineProto/Session.php @@ -133,7 +133,7 @@ Slv8kg9qv1m6XHVQY3PnEw+QQtqSIXklHwIDAQAB $packet_length = $this->struct->unpack('sock->read($packet_length - 4); if ($packet_length == 4) { - throw new Exception("Server response error: " . $this->struct->unpack('struct->unpack('newcrc32($packet_length_data.substr($packet, 0, -4)) == $this->struct->unpack('log->log('Starting Diffie Hellman key exchange'); - + $server_dh_params = $this->method_call('req_DH_params', ['nonce' => $nonce, 'server_nonce' => $server_nonce, 'p' => $p_bytes, 'q' => $q_bytes, 'public_key_fingerprint' => $public_key_fingerprint, 'encrypted_data' => $encrypted_data]); if ($nonce != $server_dh_params['nonce']) { diff --git a/src/danog/MadelineProto/TL/TL.php b/src/danog/MadelineProto/TL/TL.php index 3a5eb1ad..b353adf3 100644 --- a/src/danog/MadelineProto/TL/TL.php +++ b/src/danog/MadelineProto/TL/TL.php @@ -70,6 +70,7 @@ class TL $bytes_io .= $this->serialize_param($arg['type'], $kwargs[$argcount++]); } } + return $bytes_io; }