mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 07:53:39 +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
dff1f3894e
commit
b68cbecbe2
@ -423,16 +423,10 @@
|
|||||||
|
|
||||||
if(is_dir($data['target']))
|
if(is_dir($data['target']))
|
||||||
{
|
{
|
||||||
$dir = opendir($data['target']);
|
$targets = array();
|
||||||
$contents = array();
|
foreach(scandir($data['target']) as $target)
|
||||||
while(false !== ($item = readdir($dir))) {
|
|
||||||
$contents[] = $item;
|
|
||||||
}
|
|
||||||
closedir($dir);
|
|
||||||
$targets = array_diff($contents, array('.','..'));
|
|
||||||
$files = array();
|
|
||||||
foreach($targets as $key => &$target)
|
|
||||||
{
|
{
|
||||||
|
if ($target == '.' || $target == '..') continue;
|
||||||
$target = $data['target'].(substr($data['target'],-1) == '/' ? '' : '/').$target;
|
$target = $data['target'].(substr($data['target'],-1) == '/' ? '' : '/').$target;
|
||||||
|
|
||||||
// Check modification time, make sure it's not currently being written
|
// Check modification time, make sure it's not currently being written
|
||||||
@ -441,17 +435,14 @@
|
|||||||
if($mod_time >= time() - 10)
|
if($mod_time >= time() - 10)
|
||||||
{
|
{
|
||||||
$data['result'][$target] = lang('Skipped');
|
$data['result'][$target] = lang('Skipped');
|
||||||
unset($targets[$key]);
|
|
||||||
continue;
|
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
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user