From 93288f22a9a33fad473751a291ed08a3b6752334 Mon Sep 17 00:00:00 2001 From: Rajesh Taneja Date: Thu, 4 Oct 2012 16:11:09 +0800 Subject: [PATCH] MDL-35787 Mnet: fixed php strict standards warnings --- auth/mnet/auth.php | 3 ++- mnet/service/enrol/course.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/auth/mnet/auth.php b/auth/mnet/auth.php index ee103bb39a304..ced518370aae8 100644 --- a/auth/mnet/auth.php +++ b/auth/mnet/auth.php @@ -378,7 +378,8 @@ function confirm_mnet_session($token, $remotepeer) { $extra = $DB->get_records_sql($sql); $keys = array_keys($courses); - $defaultrole = reset(get_archetype_roles('student')); + $studentroles = get_archetype_roles('student'); + $defaultrole = reset($studentroles); //$defaultrole = get_default_course_role($ccache[$shortname]); //TODO: rewrite this completely, there is no default course role any more!!! foreach ($keys AS $id) { if ($courses[$id]->visible == 0) { diff --git a/mnet/service/enrol/course.php b/mnet/service/enrol/course.php index 97ec77181b0c5..f4382961c3c64 100644 --- a/mnet/service/enrol/course.php +++ b/mnet/service/enrol/course.php @@ -62,7 +62,7 @@ // collapsible course summary if (!empty($course->summary)) { - unset($options); + $options = new stdClass(); $options->trusted = false; $options->para = false; $options->filter = false;