From 4bbd6c0b59e906fe882802ba41c7014aa96da5df Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Fri, 25 May 2018 17:35:03 +0200 Subject: [PATCH] File download bugfix --- docs | 2 +- src/danog/MadelineProto/MTProtoTools/Files.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs b/docs index 4462f6f0..329a5e2f 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 4462f6f0c4391a3a1c6ce4f2b5cb02081a635a88 +Subproject commit 329a5e2f7bb99186c4b8f3c8693269774deed9c5 diff --git a/src/danog/MadelineProto/MTProtoTools/Files.php b/src/danog/MadelineProto/MTProtoTools/Files.php index 5b0ec286..d38f0dc9 100644 --- a/src/danog/MadelineProto/MTProtoTools/Files.php +++ b/src/danog/MadelineProto/MTProtoTools/Files.php @@ -307,7 +307,7 @@ trait Files public function download_to_dir($message_media, $dir, $cb = null) { - if (is_object($dir) && class_implements($dir)['\danog\MadelineProto\FileCallbackInterface']) { + if (is_object($dir) && class_implements($dir)['danog\MadelineProto\FileCallbackInterface']) { $cb = $dir; $dir = $dir->getFile(); } @@ -319,7 +319,7 @@ trait Files public function download_to_file($message_media, $file, $cb = null) { - if (is_object($file) && class_implements($file)['\danog\MadelineProto\FileCallbackInterface']) { + if (is_object($file) && class_implements($file)['danog\MadelineProto\FileCallbackInterface']) { $cb = $file; $file = $file->getFile(); } @@ -346,7 +346,7 @@ trait Files public function download_to_stream($message_media, $stream, $cb = null, $offset = 0, $end = -1) { - if (is_object($stream) && class_implements($stream)['\danog\MadelineProto\FileCallbackInterface']) { + if (is_object($stream) && class_implements($stream)['danog\MadelineProto\FileCallbackInterface']) { $cb = $stream; $stream = $stream->getFile(); }