From a17a29db81cedac6a186c8ae2b9bf37aeb591121 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 30 Jul 2018 09:51:44 +0200 Subject: [PATCH] fix PHP Warning: Invalid argument supplied for foreach() --- calendar/inc/class.calendar_uiviews.inc.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/calendar/inc/class.calendar_uiviews.inc.php b/calendar/inc/class.calendar_uiviews.inc.php index bd95bb5517..b47d89bc06 100644 --- a/calendar/inc/class.calendar_uiviews.inc.php +++ b/calendar/inc/class.calendar_uiviews.inc.php @@ -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']);