From 47a77c498b423cacb24c17bb9042e5c877a5a991 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Mon, 23 Jan 2017 17:27:20 +0100 Subject: [PATCH] Bugfixes --- src/danog/MadelineProto/MTProtoTools/CallHandler.php | 2 +- src/danog/MadelineProto/TL/TLMethod.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/danog/MadelineProto/MTProtoTools/CallHandler.php b/src/danog/MadelineProto/MTProtoTools/CallHandler.php index cc11e7a2..f6712517 100644 --- a/src/danog/MadelineProto/MTProtoTools/CallHandler.php +++ b/src/danog/MadelineProto/MTProtoTools/CallHandler.php @@ -135,7 +135,7 @@ trait CallHandler $this->datacenter->outgoing_messages[$int_message_id]['args'] = []; } } - if ($server_answer == null) { + if ($server_answer === null) { throw new \danog\MadelineProto\Exception('An error occurred while calling method '.$method.'.'); } \danog\MadelineProto\Logger::log('Got response for method '.$method.' @ try '.$count.' (response try '.$res_count.')'); diff --git a/src/danog/MadelineProto/TL/TLMethod.php b/src/danog/MadelineProto/TL/TLMethod.php index 3af27f63..28cc03f1 100644 --- a/src/danog/MadelineProto/TL/TLMethod.php +++ b/src/danog/MadelineProto/TL/TLMethod.php @@ -38,7 +38,7 @@ class TLMethod extends TLParams public function find_by_method($method) { - $key = array_search(strtolower($method), array_map('strtolower', $this->method)); + $key = array_search($method, $this->method); return ($key === false) ? false : [ 'id' => $this->id[$key],