]> git.mjollnir.org Git - moodle.git/commitdiff
Check attachment variable to prevent warnings
authormoodler <moodler>
Sun, 25 Apr 2004 02:15:48 +0000 (02:15 +0000)
committermoodler <moodler>
Sun, 25 Apr 2004 02:15:48 +0000 (02:15 +0000)
mod/forum/post.php

index 45ddbdb6b8e9710a8479e7b8ebad1fe737049a66..82fd8e3dee7a9cfe8a44862e44867d62250732fc 100644 (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;