diff --git a/api/src/Vfs.php b/api/src/Vfs.php index d4aae82f31..7f00b0e7c0 100644 --- a/api/src/Vfs.php +++ b/api/src/Vfs.php @@ -2091,7 +2091,7 @@ class Vfs extends Vfs\StreamWrapper if (is_resource($tmp_name)) { $ret = ($dest = egw_vfs::fopen($target, 'w')) && - stream_copy_to_stream($tmp_name, $dest) && + stream_copy_to_stream($tmp_name, $dest) !== false && fclose($dest) && self::stat($target); fclose($tmp_name); diff --git a/phpgwapi/inc/class.egw_link.inc.php b/phpgwapi/inc/class.egw_link.inc.php index 0843f5d7e7..8b552758db 100644 --- a/phpgwapi/inc/class.egw_link.inc.php +++ b/phpgwapi/inc/class.egw_link.inc.php @@ -1596,6 +1596,8 @@ class egw_link extends solink } $ret = call_user_func_array('ExecMethod2', $data); + if (is_resource($ret)) fseek($ret, 0); + if ($return_resource != is_resource($ret)) { if ($return_resource && ($fp = fopen('php://temp', 'w'))) @@ -1608,7 +1610,6 @@ class egw_link extends solink { $fp = $ret; $ret = ''; - fseek($fp, 0); while(!feof($fp)) { $ret .= fread($fp, 8192);