mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
Prevent one warning
Merged from MOODLE_18_STABLE
This commit is contained in:
parent
d660c423fd
commit
42fa499221
@ -833,7 +833,7 @@ function get_my_courses($userid, $sort=NULL, $fields=NULL, $doanything=false,$li
|
||||
$USER->mycourses[$doanything] = $mycourses;
|
||||
}
|
||||
|
||||
if ($reallimit) {
|
||||
if (!empty($mycourses) && $reallimit) {
|
||||
return array_slice($mycourses, 0, $reallimit, true);
|
||||
} else {
|
||||
return $mycourses;
|
||||
|
Loading…
x
Reference in New Issue
Block a user