Fixes
This commit is contained in:
parent
c70f5da7bd
commit
e2e0c775e7
@ -233,11 +233,11 @@ trait Files
|
||||
|
||||
public function download_to_file($message_media, $file, $cb = null)
|
||||
{
|
||||
$file = realpath($file);
|
||||
$message_media = $this->get_download_info($message_media);
|
||||
if (!file_exists($file)) {
|
||||
touch($file);
|
||||
}
|
||||
$file = realpath($file);
|
||||
$message_media = $this->get_download_info($message_media);
|
||||
$stream = fopen($file, 'r+b');
|
||||
flock($stream, LOCK_EX);
|
||||
$this->download_to_stream($message_media, $stream, $cb, filesize($file), -1);
|
||||
|
@ -73,6 +73,8 @@ class Serialization
|
||||
|
||||
try {
|
||||
$unserialized = unserialize($tounserialize);
|
||||
} catch (\danog\MadelineProto\Bug74586Exception $e) {
|
||||
$unserialized = \danog\Serialization::unserialize($tounserialize);
|
||||
} catch (\danog\MadelineProto\Exception $e) {
|
||||
$unserialized = \danog\Serialization::unserialize($tounserialize);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user