mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
MDL-65469 mod_forum: Check for existence before operating
This commit is contained in:
parent
0f2b29242e
commit
e7bf69e057
@ -789,11 +789,11 @@ if ($mformpost->no_submit_button_pressed()) {
|
||||
$data = $mformpost->get_submitted_data();
|
||||
|
||||
// If a no submit button has been pressed but the default values haven't been then reset the form change.
|
||||
if (!$dirty && !empty(trim($data->message['text']))) {
|
||||
if (!$dirty && isset($data->message['text']) && !empty(trim($data->message['text']))) {
|
||||
$dirty = true;
|
||||
}
|
||||
|
||||
if (!$dirty && !empty(trim($data->message['message']))) {
|
||||
if (!$dirty && isset($data->message['message']) && !empty(trim($data->message['message']))) {
|
||||
$dirty = true;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user