MDL-55367 report_log: declare log array indexes to avoid errors
authorSimey Lameze <simey@moodle.com>
Wed, 3 Aug 2016 06:23:44 +0000 (14:23 +0800)
committerSimey Lameze <simey@moodle.com>
Wed, 3 Aug 2016 06:23:44 +0000 (14:23 +0800)
report/log/locallib.php

index e14b1f5..317203e 100644 (file)
@@ -566,6 +566,8 @@ function report_log_userall_data($course, $user, $logreader) {
     $timestart = $coursestart = usergetmidnight($course->startdate);
 
     $i = 0;
     $timestart = $coursestart = usergetmidnight($course->startdate);
 
     $i = 0;
+    $logs['series'][$i] = 0;
+    $logs['labels'][$i] = 0;
     while ($timestart < $timenow) {
         $timefinish = $timestart + 86400;
         $logs['labels'][$i] = userdate($timestart, "%a %d %b");
     while ($timestart < $timenow) {
         $timefinish = $timestart + 86400;
         $logs['labels'][$i] = userdate($timestart, "%a %d %b");