mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-24 00:43:20 +01:00
trying to work arround "PHP Fatal error: Cannot unset string offsets in /usr/share/egroupware/importexport/inc/class.importexport_schedule_ui.inc.php on line 444"
This commit is contained in:
parent
57730480a7
commit
9319cfd8c4
@ -423,16 +423,10 @@
|
||||
|
||||
if(is_dir($data['target']))
|
||||
{
|
||||
$dir = opendir($data['target']);
|
||||
$contents = array();
|
||||
while(false !== ($item = readdir($dir))) {
|
||||
$contents[] = $item;
|
||||
}
|
||||
closedir($dir);
|
||||
$targets = array_diff($contents, array('.','..'));
|
||||
$files = array();
|
||||
foreach($targets as $key => &$target)
|
||||
$targets = array();
|
||||
foreach(scandir($data['target']) as $target)
|
||||
{
|
||||
if ($target == '.' || $target == '..') continue;
|
||||
$target = $data['target'].(substr($data['target'],-1) == '/' ? '' : '/').$target;
|
||||
|
||||
// Check modification time, make sure it's not currently being written
|
||||
@ -441,17 +435,14 @@
|
||||
if($mod_time >= time() - 10)
|
||||
{
|
||||
$data['result'][$target] = lang('Skipped');
|
||||
unset($target[$key]);
|
||||
continue;
|
||||
}
|
||||
$files[$mod_time.$target] = $target;
|
||||
$targets[$mod_time.$target] = $target;
|
||||
}
|
||||
if($files)
|
||||
if($targets)
|
||||
{
|
||||
ksort($files);
|
||||
ksort($targets);
|
||||
}
|
||||
$targets = $files;
|
||||
unset($target); // Unset it, or it will be overwritten in loop below
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user