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,10 +935,13 @@ class calendar_uiviews extends calendar_ui
$set_execute = function(&$action) use (&$set_execute) $set_execute = function(&$action) use (&$set_execute)
{ {
$action['onExecute'] = 'javaScript:app.calendar.action_merge'; $action['onExecute'] = 'javaScript:app.calendar.action_merge';
if (!empty($action['children']))
{
foreach($action['children'] as &$child) foreach($action['children'] as &$child)
{ {
$set_execute($child); $set_execute($child);
} }
}
}; };
$set_execute($actions['documents']); $set_execute($actions['documents']);
$actions['ical']['onExecute'] = 'javaScript:app.calendar.ical'; $actions['ical']['onExecute'] = 'javaScript:app.calendar.ical';