From: skodak Date: Wed, 29 Aug 2007 20:20:10 +0000 (+0000) Subject: MDL-11023 silence warnings in PHP 4.x - the last param was added in PHP 5.0.2; merged... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=2d675a2331913e95b85530513c19423c0ac03630;p=moodle.git MDL-11023 silence warnings in PHP 4.x - the last param was added in PHP 5.0.2; merged from MODOLE_18_STABLE --- diff --git a/lib/datalib.php b/lib/datalib.php index 73bc9aa8e2..0b2004c3c8 100644 --- a/lib/datalib.php +++ b/lib/datalib.php @@ -619,7 +619,8 @@ function get_my_courses($userid, $sort=NULL, $fields=NULL, $doanything=false,$li if (!empty($USER->id) && ($USER->id == $userid) && $usingdefaults) { if (!empty($USER->mycourses[$doanything])) { if ($limit && $limit < count($USER->mycourses[$doanything])) { - return array_slice($USER->mycourses[$doanything], 0, $limit, true); + //silence warnings in PHP 4.x - the last param was added in PHP 5.0.2 + return @array_slice($USER->mycourses[$doanything], 0, $limit, true); } else { return $USER->mycourses[$doanything]; }