mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 14:41: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
|
// 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']);
|
foreach($content['attachments'] as &$attach)
|
||||||
$attach['filemode_icon'] = !is_dir($attach['file']) &&
|
{
|
||||||
($content['filemode'] == Vfs\Sharing::READONLY || $content['filemode'] == Vfs\Sharing::WRITABLE)
|
$attach['is_dir'] = is_dir($attach['file']);
|
||||||
? Vfs\Sharing::LINK : $content['filemode'];
|
$attach['filemode_icon'] = !is_dir($attach['file']) &&
|
||||||
$attach['filemode_title'] = lang(Vfs\Sharing::$modes[$attach['filemode_icon']]['label']);
|
($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']);
|
$content['to'] = self::resolveEmailAddressList($content['to']);
|
||||||
|
Loading…
Reference in New Issue
Block a user