mirror of
https://github.com/phpseclib/phpseclib.git
synced 2025-01-30 10:38:37 +00:00
Merge branch '2.0'
This commit is contained in:
commit
84d40ad8e0
@ -1907,7 +1907,14 @@ class SFTP extends SSH2
|
|||||||
break;
|
break;
|
||||||
case is_resource($data):
|
case is_resource($data):
|
||||||
$mode = $mode & ~self::SOURCE_LOCAL_FILE;
|
$mode = $mode & ~self::SOURCE_LOCAL_FILE;
|
||||||
$fp = $data;
|
$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;
|
break;
|
||||||
case $mode & self::SOURCE_LOCAL_FILE:
|
case $mode & self::SOURCE_LOCAL_FILE:
|
||||||
if (!is_file($data)) {
|
if (!is_file($data)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user