mirror of
https://github.com/danog/tgseclib.git
synced 2024-11-30 04:39:02 +01:00
Merge branch '1.0' into 2.0
This commit is contained in:
commit
64dd2e064b
@ -1916,7 +1916,14 @@ class SFTP extends SSH2
|
||||
break;
|
||||
case is_resource($data):
|
||||
$mode = $mode & ~self::SOURCE_LOCAL_FILE;
|
||||
$info = stream_get_meta_data($data);
|
||||
if ($info['wrapper_type'] == 'PHP' && $info['stream_type'] == 'Input') {
|
||||
$fp = fopen('php://memory', 'w+');
|
||||
stream_copy_to_stream($data, $fp);
|
||||
rewind($fp);
|
||||
} else {
|
||||
$fp = $data;
|
||||
}
|
||||
break;
|
||||
case $mode & self::SOURCE_LOCAL_FILE:
|
||||
if (!is_file($data)) {
|
||||
|
Loading…
Reference in New Issue
Block a user