diff --git a/src/danog/MadelineProto/TL/Extension.php b/src/danog/MadelineProto/TL/Extension.php index 65c4583dd..4ffe14371 100644 --- a/src/danog/MadelineProto/TL/Extension.php +++ b/src/danog/MadelineProto/TL/Extension.php @@ -419,7 +419,9 @@ trait Extension { $this->switch_dc($location['dc_id']); $res = $this->method_call('upload.getFile', ['location' => $location, 'offset' => 0, 'limit' => 1], ['heavy' => true]); - if (!isset($res['type']['_'])) return $default; + if (!isset($res['type']['_'])) { + return $default; + } switch ($res['type']['_']) { case 'storage.fileJpeg': return '.jpg'; case 'storage.fileGif': return '.gif';