Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
punyflash committed Sep 1, 2020
1 parent 0c877d3 commit a5de968
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/TelegramMethod/SendPhotoMethod.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use WeStacks\TeleBot\Helpers\TypeCaster;
use WeStacks\TeleBot\TelegramMethod;
use WeStacks\TeleBot\TelegramObject\InputFile;
use WeStacks\TeleBot\TelegramObject\Keyboard;
use WeStacks\TeleBot\TelegramObject\Message;

class SendPhotoMethod extends TelegramMethod
Expand Down
1 change: 1 addition & 0 deletions src/TelegramObject/InlineQueryResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use WeStacks\TeleBot\TelegramObject;
use WeStacks\TeleBot\TelegramObject\InlineQueryResult\InlineQueryResultArticle;
use WeStacks\TeleBot\TelegramObject\InlineQueryResult\InlineQueryResultAudio;
use WeStacks\TeleBot\TelegramObject\InlineQueryResult\InlineQueryResultCachedPhoto;
use WeStacks\TeleBot\TelegramObject\InlineQueryResult\InlineQueryResultContact;
use WeStacks\TeleBot\TelegramObject\InlineQueryResult\InlineQueryResultDocument;
use WeStacks\TeleBot\TelegramObject\InlineQueryResult\InlineQueryResultGame;
Expand Down
2 changes: 1 addition & 1 deletion src/TelegramObject/InputFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function __construct($file, string $filename = null)
$file = $file['file'] ?? null;
}

if(is_null($file)) throw TeleBotFileException::fileCantBeNull();
if(is_null($file) || is_bool($file)) throw TeleBotFileException::fileCantBeNull();

$this->filename = $filename ?? 'input_file';

Expand Down

0 comments on commit a5de968

Please sign in to comment.