mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
Prevent one warning
Merged from MOODLE_18_STABLE
This commit is contained in:
parent
d660c423fd
commit
42fa499221
1 changed files with 1 additions and 1 deletions
|
@ -833,7 +833,7 @@ function get_my_courses($userid, $sort=NULL, $fields=NULL, $doanything=false,$li
|
||||||
$USER->mycourses[$doanything] = $mycourses;
|
$USER->mycourses[$doanything] = $mycourses;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($reallimit) {
|
if (!empty($mycourses) && $reallimit) {
|
||||||
return array_slice($mycourses, 0, $reallimit, true);
|
return array_slice($mycourses, 0, $reallimit, true);
|
||||||
} else {
|
} else {
|
||||||
return $mycourses;
|
return $mycourses;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue