fix PHP Warning: Invalid argument supplied for foreach()

This commit is contained in:
Ralf Becker 2018-07-30 09:51:44 +02:00
parent d53c6c4180
commit a17a29db81

View File

@ -935,9 +935,12 @@ class calendar_uiviews extends calendar_ui
$set_execute = function(&$action) use (&$set_execute)
{
$action['onExecute'] = 'javaScript:app.calendar.action_merge';
foreach($action['children'] as &$child)
if (!empty($action['children']))
{
$set_execute($child);
foreach($action['children'] as &$child)
{
$set_execute($child);
}
}
};
$set_execute($actions['documents']);