Skip to content

Commit

Permalink
MDL-51250 course: No function returns in empty()
Browse files Browse the repository at this point in the history
  • Loading branch information
David Monllao authored and danpoltawski committed Oct 6, 2015
1 parent 05e6215 commit d1583d8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion course/editsection_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ function get_data() {
$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,
Expand Down

0 comments on commit d1583d8

Please sign in to comment.