From: dongsheng Date: Thu, 2 Apr 2009 02:49:54 +0000 (+0000) Subject: "MDL-13224, convert type of courses limit, everything coming from database is string... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=8b8ff6ff4ce06f1020b575093cc73683008939e3;p=moodle.git "MDL-13224, convert type of courses limit, everything coming from database is string, merged from 1.9" --- diff --git a/my/index.php b/my/index.php index 9edf5d549a..9670f5bf22 100644 --- a/my/index.php +++ b/my/index.php @@ -61,7 +61,8 @@ // limits the number of courses showing up $courses_limit = 21; - if (!empty($CFG->mycoursesperpage) && is_int($CFG->mycoursesperpage)) { + $CFG->mycoursesperpage = (int)$CFG->mycoursesperpage; + if (!empty($CFG->mycoursesperpage)) { $courses_limit = $CFG->mycoursesperpage; } $courses = get_my_courses($USER->id, 'visible DESC,sortorder ASC', '*', false, $courses_limit);