mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 16:03:47 +01:00
fix An error happened (ErrorException): Argument 4 passed to EGroupware\Api\Vfs::copy_files() must be of the type array, none given
This commit is contained in:
parent
7a77706878
commit
58834a0c73
@ -1937,8 +1937,11 @@ class Vfs extends Vfs\StreamWrapper
|
|||||||
*
|
*
|
||||||
* @param array $src contains the source file
|
* @param array $src contains the source file
|
||||||
* @param string $dst is the destination directory
|
* @param string $dst is the destination directory
|
||||||
|
* @param int& $errs =null on return number of errors happened
|
||||||
|
* @param array& $copied =null on return files copied
|
||||||
|
* @return boolean true for no errors, false otherwise
|
||||||
*/
|
*/
|
||||||
static public function copy_files(array $src, $dst, &$errs, array &$copied)
|
static public function copy_files(array $src, $dst, &$errs=null, array &$copied=null)
|
||||||
{
|
{
|
||||||
if (self::is_dir($dst))
|
if (self::is_dir($dst))
|
||||||
{
|
{
|
||||||
|
@ -460,7 +460,7 @@ class Sharing
|
|||||||
if ($mode == 'link')
|
if ($mode == 'link')
|
||||||
{
|
{
|
||||||
$user_tmp = '/home/'.$GLOBALS['egw_info']['user']['account_lid'].'/.tmp';
|
$user_tmp = '/home/'.$GLOBALS['egw_info']['user']['account_lid'].'/.tmp';
|
||||||
if (!Vfs::file_exists($user_tmp) && !Vfs::mkdir($user_tmp))
|
if (!Vfs::file_exists($user_tmp) && !Vfs::mkdir($user_tmp, null, STREAM_MKDIR_RECURSIVE))
|
||||||
{
|
{
|
||||||
throw new Api\Exception\AssertionFailed("Could NOT create temp. directory '$user_tmp'!");
|
throw new Api\Exception\AssertionFailed("Could NOT create temp. directory '$user_tmp'!");
|
||||||
}
|
}
|
||||||
@ -468,7 +468,7 @@ class Sharing
|
|||||||
do {
|
do {
|
||||||
$tmp_file = Vfs::concat($user_tmp, ($n?$n.'.':'').Vfs::basename($name));
|
$tmp_file = Vfs::concat($user_tmp, ($n?$n.'.':'').Vfs::basename($name));
|
||||||
}
|
}
|
||||||
while(!(is_dir($path) && Vfs::mkdir($tmp_file) ||
|
while(!(is_dir($path) && Vfs::mkdir($tmp_file, null, STREAM_MKDIR_RECURSIVE) ||
|
||||||
!is_dir($path) && (!Vfs::file_exists($tmp_file) && ($fp = Vfs::fopen($tmp_file, 'x')) ||
|
!is_dir($path) && (!Vfs::file_exists($tmp_file) && ($fp = Vfs::fopen($tmp_file, 'x')) ||
|
||||||
// do not copy identical files again to users tmp dir, just re-use them
|
// do not copy identical files again to users tmp dir, just re-use them
|
||||||
Vfs::file_exists($tmp_file) && Vfs::compare(Vfs::PREFIX.$tmp_file, $path))) && $n++ < 100);
|
Vfs::file_exists($tmp_file) && Vfs::compare(Vfs::PREFIX.$tmp_file, $path))) && $n++ < 100);
|
||||||
|
Loading…
Reference in New Issue
Block a user