From: skodak Date: Wed, 26 Apr 2006 21:13:45 +0000 (+0000) Subject: fixed warning when no stats data yet X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=3f73372fe59199561975e6f4586bbe25c9549e85;p=moodle.git fixed warning when no stats data yet --- diff --git a/lib/statslib.php b/lib/statslib.php index 143bf63da4..8b8a5ebb9c 100644 --- a/lib/statslib.php +++ b/lib/statslib.php @@ -750,6 +750,8 @@ function stats_get_time_options($now,$lastweekend,$lastmonthend,$earliestday,$ea // so we need to take a day off here (essentially add a day to $now $now += 60*60*24; + $timeoptions = array(); + if ($now - (60*60*24*7) >= $earliestday) { $timeoptions[STATS_TIME_LASTWEEK] = get_string('numweeks','moodle',1); }