mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 08:34:29 +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,13 +1368,16 @@ class mail_compose
|
||||
}
|
||||
|
||||
// set filemode icons for all attachments
|
||||
foreach((array)$content['attachments'] as &$attach)
|
||||
if($content['attachments'] && is_array($content['attachments']))
|
||||
{
|
||||
$attach['is_dir'] = is_dir($attach['file']);
|
||||
$attach['filemode_icon'] = !is_dir($attach['file']) &&
|
||||
($content['filemode'] == Vfs\Sharing::READONLY || $content['filemode'] == Vfs\Sharing::WRITABLE)
|
||||
? Vfs\Sharing::LINK : $content['filemode'];
|
||||
$attach['filemode_title'] = lang(Vfs\Sharing::$modes[$attach['filemode_icon']]['label']);
|
||||
foreach($content['attachments'] as &$attach)
|
||||
{
|
||||
$attach['is_dir'] = is_dir($attach['file']);
|
||||
$attach['filemode_icon'] = !is_dir($attach['file']) &&
|
||||
($content['filemode'] == Vfs\Sharing::READONLY || $content['filemode'] == Vfs\Sharing::WRITABLE)
|
||||
? Vfs\Sharing::LINK : $content['filemode'];
|
||||
$attach['filemode_title'] = lang(Vfs\Sharing::$modes[$attach['filemode_icon']]['label']);
|
||||
}
|
||||
}
|
||||
|
||||
$content['to'] = self::resolveEmailAddressList($content['to']);
|
||||
|
Loading…
Reference in New Issue
Block a user