From b5786a65029e9d55d5465a0237c55539e8eb0361 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Thu, 11 Jul 2019 17:07:38 +0200 Subject: [PATCH] RPC error description fetching bugfix --- src/danog/MadelineProto/RPCErrorException.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/danog/MadelineProto/RPCErrorException.php b/src/danog/MadelineProto/RPCErrorException.php index d7f27a12..c75e2517 100644 --- a/src/danog/MadelineProto/RPCErrorException.php +++ b/src/danog/MadelineProto/RPCErrorException.php @@ -88,7 +88,7 @@ class RPCErrorException extends \Exception || $code === 500 ) { $res = json_decode(@file_get_contents('https://rpc.pwrtelegram.xyz/?method='.$method.'&code='.$code.'&error='.$error), true); - if (isset($res['ok']) && $res['ok']) { + if (isset($res['ok']) && $res['ok'] && isset($res['result'])) { $description = $res['result']; self::$descriptions[$error] = $description;