Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fixed warning when no referer available; merged from MOODLE_16_STABLE
  • Loading branch information
skodak committed Jul 31, 2006
1 parent d1a6608 commit 1322b71
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion mod/forum/post.php
Expand Up @@ -372,7 +372,11 @@
} else if (!empty($forum)) {
/// User is starting a new discussion in a forum

$SESSION->fromurl = $_SERVER["HTTP_REFERER"];
if (!empty($_SERVER["HTTP_REFERER"])) {
$SESSION->fromurl = $_SERVER["HTTP_REFERER"];
} else {
$SESSION->fromurl = '';
}

if (! $forum = get_record("forum", "id", $forum)) {
error("The forum number was incorrect ($forum)");
Expand Down

0 comments on commit 1322b71

Please sign in to comment.