From c0e9455017b4abb482594569a06600dba5fc9f56 Mon Sep 17 00:00:00 2001 From: Dan Marsden Date: Mon, 15 Jul 2013 14:45:33 +1200 Subject: [PATCH] check var exists before using --- sessions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sessions.php b/sessions.php index cdef07a..046a596 100644 --- a/sessions.php +++ b/sessions.php @@ -208,7 +208,7 @@ function construct_sessions_data_for_add($formdata) { while ($sdate < $enddate) { if ($sdate < $startweek + WEEKSECS) { $dinfo = usergetdate($sdate); - if (array_key_exists($wdaydesc[$dinfo['wday']], $formdata->sdays)) { + if (isset($formdata->sdays) && array_key_exists($wdaydesc[$dinfo['wday']], $formdata->sdays)) { $sess = new stdClass(); $sess->sessdate = usergetmidnight($sdate) + $starttime; $sess->duration = $duration;