mirror of
https://github.com/moodle/moodle.git
synced 2025-02-01 13:28:17 +01:00
Check attachment variable to prevent warnings
This commit is contained in:
parent
7969713a4f
commit
36257d39d5
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user