Merge pull request #404 from grandoc/develop
fix: Warning : Invalid argument supplied for foreach()
This commit is contained in:
commit
cd3d01127c
@ -450,6 +450,8 @@ class FormFile
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Loop on each file found
|
// Loop on each file found
|
||||||
|
if (is_array($file_list))
|
||||||
|
{
|
||||||
foreach($file_list as $file)
|
foreach($file_list as $file)
|
||||||
{
|
{
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
@ -479,7 +481,7 @@ class FormFile
|
|||||||
|
|
||||||
// Show file date
|
// Show file date
|
||||||
$date=(! empty($file['date'])?$file['date']:dol_filemtime($filedir."/".$file["name"]));
|
$date=(! empty($file['date'])?$file['date']:dol_filemtime($filedir."/".$file["name"]));
|
||||||
$out.= '<td align="right" nowrap="nowrap">'.dol_print_date($date, 'dayhour','tzuser').'</td>';
|
$out.= '<td align="right" nowrap="nowrap">'.dol_print_date($date, 'dayhour').'</td>';
|
||||||
|
|
||||||
if ($delallowed)
|
if ($delallowed)
|
||||||
{
|
{
|
||||||
@ -490,6 +492,7 @@ class FormFile
|
|||||||
//$out.= '&urlsource='.urlencode($urlsource); // TODO obsolete ?
|
//$out.= '&urlsource='.urlencode($urlsource); // TODO obsolete ?
|
||||||
$out.= '">'.img_delete().'</a></td>';
|
$out.= '">'.img_delete().'</a></td>';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$out.= '</tr>';
|
$out.= '</tr>';
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user