-
Bug
-
Resolution: Fixed
-
Minor
-
2.7.13
-
None
-
2014121900
-
MOODLE_27_STABLE
-
MOODLE_29_STABLE
Hi,
I've found a notice from php. Just a undefined variable.
Symptoms / How to reproduce
After creating a forum and a discussion, on the discussion page, when we click on the link to return on the forum (the link beginning by "«"), we have a beautiful notice from php :
Notice: Undefined variable: cm in /home/pedagroot/Documents/moodleBase/mod/hsuforum/view.php on line 59
Possible fixes
1. (Simplest) Replace the `!$cm` by `empty($cm)` (line 59)
2. (Better) Remove the `if` lines 59 to 61, then add between the actual line 40 and 41 the following lines :
if (!$cm = get_coursemodule_from_instance("forumimproved", $forum->id, $course->id)) { |
print_error('missingparameter'); |
}
|