Check attachment variable to prevent warnings

This commit is contained in:
moodler 2004-04-25 02:15:48 +00:00
parent 7969713a4f
commit 36257d39d5

View File

@ -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;