From c86d1824fef70766f1f04a7f3ce2c118c411e037 Mon Sep 17 00:00:00 2001
From: John Kristensen <John.Kristensen@dpipwe.tas.gov.au>
Date: Wed, 12 Oct 2011 15:23:39 +1100
Subject: [PATCH] Improve handling of calendar export $_GET params

 * a notice would be reported if either of the 'cal' or 'event' $_GET params
   where not supplied, which would result in 'Cannot modify header information'
   warnings
---
 apps/calendar/export.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/apps/calendar/export.php b/apps/calendar/export.php
index b3e5ecd683..3e93a1ad61 100644
--- a/apps/calendar/export.php
+++ b/apps/calendar/export.php
@@ -9,8 +9,8 @@
 require_once ("../../lib/base.php");
 OC_Util::checkLoggedIn();
 OC_Util::checkAppEnabled('calendar');
-$cal = $_GET["calid"];
-$event = $_GET["eventid"];
+$cal = isset($_GET["calid"]) ? $_GET["calid"] : NULL;
+$event = isset($_GET["eventid"]) ? $_GET["eventid"] : NULL;
 if(isset($cal)){
 	$calendar = OC_Calendar_Calendar::findCalendar($cal);
 	if($calendar["userid"] != OC_User::getUser()){
-- 
GitLab