Calendar - avoid warning about illegal string offset 'template'

This commit is contained in:
nathangray 2019-06-21 09:52:59 -06:00
parent 7306cc36ab
commit 29cf6e60aa

View File

@ -1511,8 +1511,7 @@ class calendar_uiforms extends calendar_ui
'no_popup' => isset($_GET['no_popup']), 'no_popup' => isset($_GET['no_popup']),
'template' => isset($_GET['template']) ? $_GET['template'] : (isset($_REQUEST['print']) ? 'calendar.print' : 'calendar.edit'), 'template' => isset($_GET['template']) ? $_GET['template'] : (isset($_REQUEST['print']) ? 'calendar.print' : 'calendar.edit'),
); );
if($preserv['template'] && ($registry = Link::get_registry('calendar', 'add')) && $registry['template'] == $preserv['template'] && if($preserv['template'] && $this->cal_prefs['new_event_dialog'] == 'edit')
$this->cal_prefs['new_event_dialog'] == 'edit')
{ {
// User wants full thing // User wants full thing
unset($preserv['template']); unset($preserv['template']);