From 3f73372fe59199561975e6f4586bbe25c9549e85 Mon Sep 17 00:00:00 2001 From: skodak Date: Wed, 26 Apr 2006 21:13:45 +0000 Subject: [PATCH] fixed warning when no stats data yet --- lib/statslib.php | 2 ++ 1 file changed, 2 insertions(+) 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); } -- 2.39.5