MDL-51250 course: No function returns in empty()

This commit is contained in:
David Monllao 2015-10-06 11:39:39 +08:00 committed by Dan Poltawski
parent 05e6215c48
commit d1583d8e9c

View File

@ -112,7 +112,8 @@ class editsection_form extends moodleform {
$data = parent::get_data();
if ($data !== null) {
$editoroptions = $this->_customdata['editoroptions'];
if (!empty($data->usedefaultname) || empty(trim($data->name))) {
$trimmedname = $data->name;
if (!empty($data->usedefaultname) || empty($trimmedname)) {
$data->name = null;
}
$data = file_postupdate_standard_editor($data, 'summary', $editoroptions,