]> git.mjollnir.org Git - moodle.git/commitdiff
fixed warning when no stats data yet
authorskodak <skodak>
Wed, 26 Apr 2006 21:13:45 +0000 (21:13 +0000)
committerskodak <skodak>
Wed, 26 Apr 2006 21:13:45 +0000 (21:13 +0000)
lib/statslib.php

index 143bf63da485613fab0acfb331f193e84774311e..8b8a5ebb9c019f30e90f8ccbdbe246b1c2d4299a 100644 (file)
@@ -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);
     }