mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 06:30:59 +01:00
Silence warning about "Invalid argument supplied for foreach()" in a way that still works with reference
This commit is contained in:
parent
d40a282f0d
commit
996ce52b1a
@ -1368,7 +1368,9 @@ class mail_compose
|
||||
}
|
||||
|
||||
// set filemode icons for all attachments
|
||||
foreach((array)$content['attachments'] as &$attach)
|
||||
if($content['attachments'] && is_array($content['attachments']))
|
||||
{
|
||||
foreach($content['attachments'] as &$attach)
|
||||
{
|
||||
$attach['is_dir'] = is_dir($attach['file']);
|
||||
$attach['filemode_icon'] = !is_dir($attach['file']) &&
|
||||
@ -1376,6 +1378,7 @@ class mail_compose
|
||||
? Vfs\Sharing::LINK : $content['filemode'];
|
||||
$attach['filemode_title'] = lang(Vfs\Sharing::$modes[$attach['filemode_icon']]['label']);
|
||||
}
|
||||
}
|
||||
|
||||
$content['to'] = self::resolveEmailAddressList($content['to']);
|
||||
//error_log(__METHOD__.__LINE__.array2string($content));
|
||||
|
Loading…
Reference in New Issue
Block a user