mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-06-07 19:10:50 +00:00
Detect if stream metadata has wrapper_type set for SFTP put() method
This commit is contained in:
parent
1dfd1b9cd4
commit
eb71a6da75
|
@ -2328,7 +2328,7 @@ class Net_SFTP extends Net_SSH2
|
|||
case is_resource($data):
|
||||
$mode = $mode & ~NET_SFTP_LOCAL_FILE;
|
||||
$info = stream_get_meta_data($data);
|
||||
if ($info['wrapper_type'] == 'PHP' && $info['stream_type'] == 'Input') {
|
||||
if (isset($info['wrapper_type']) && $info['wrapper_type'] == 'PHP' && $info['stream_type'] == 'Input') {
|
||||
$fp = fopen('php://memory', 'w+');
|
||||
stream_copy_to_stream($data, $fp);
|
||||
rewind($fp);
|
||||
|
|
Loading…
Reference in New Issue
Block a user