Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merged from MOODLE_15_STABLE: Postgres doesn't happily convert NULL t…

…o 0 for int fields, so we set it manually. Credit: Patrick Li
  • Loading branch information...
commit 67bbc9b7de1f661e3e5d5dc6fe5ff048dc280dc9 1 parent 168d73d
mjollnir_ authored
Showing with 3 additions and 3 deletions.
  1. +1 −1  mod/forum/subscribe.php
  2. +2 −2 mod/forum/view.php
View
2  mod/forum/subscribe.php
@@ -24,7 +24,7 @@
}
}
} else {
- $cm->id = NULL;
+ $cm->id = 0;
}
if ($user) {
View
4 mod/forum/view.php
@@ -42,7 +42,7 @@
if ($cm = get_coursemodule_from_instance("forum", $forum->id, $course->id)) {
$buttontext = update_module_button($cm->id, $course->id, $strforum);
} else {
- $cm->id = NULL;
+ $cm->id = 0;
$cm->visible = 1;
$cm->course = $course->id;
$buttontext = "";
@@ -66,7 +66,7 @@
}
}
- if ($cm) {
+ if ($cm->id) {
add_to_log($course->id, "forum", "view forum", "view.php?id=$cm->id", "$forum->id", $cm->id);
} else {
add_to_log($course->id, "forum", "view forum", "view.php?f=$forum->id", "$forum->id");
Please sign in to comment.
Something went wrong with that request. Please try again.