From: moodler Date: Sun, 25 Apr 2004 02:15:48 +0000 (+0000) Subject: Check attachment variable to prevent warnings X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=36257d39d55ea53e1790f8d37260ff18fd781a2d;p=moodle.git Check attachment variable to prevent warnings --- diff --git a/mod/forum/post.php b/mod/forum/post.php index 45ddbdb6b8..82fd8e3dee 100644 --- a/mod/forum/post.php +++ b/mod/forum/post.php @@ -25,7 +25,7 @@ $post->message = clean_text($post->message, $post->format); // Clean up any bad tags - $post->attachment = $_FILES["attachment"]; + $post->attachment = isset($_FILES['attachment']) ? $_FILES['attachment'] : NULL; if (!$cm = get_coursemodule_from_instance("forum", $post->forum, $post->course)) { // For the logs $cm->id = 0;