Merge branch '3.0'

This commit is contained in:
terrafrost 2022-05-10 22:14:16 -05:00
commit 0446caf2f6

View File

@ -1936,7 +1936,7 @@ class SFTP extends SSH2
case is_resource($data): case is_resource($data):
$mode = $mode & ~self::SOURCE_LOCAL_FILE; $mode = $mode & ~self::SOURCE_LOCAL_FILE;
$info = stream_get_meta_data($data); $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+'); $fp = fopen('php://memory', 'w+');
stream_copy_to_stream($data, $fp); stream_copy_to_stream($data, $fp);
rewind($fp); rewind($fp);