Home
Documentation
Downloads
Demo
Tracker
Development
Translation
Moodle.net
Search
projects
/
moodle.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
05e6215
)
MDL-51250 course: No function returns in empty()
author
David Monllao
<davidm@moodle.com>
Tue, 6 Oct 2015 03:39:39 +0000
(11:39 +0800)
committer
Dan Poltawski
<dan@moodle.com>
Tue, 6 Oct 2015 15:32:38 +0000
(16:32 +0100)
course/editsection_form.php
patch
|
blob
|
blame
|
history
diff --git
a/course/editsection_form.php
b/course/editsection_form.php
index
f4a9df4
..
2505523
100644
(file)
--- a/
course/editsection_form.php
+++ b/
course/editsection_form.php
@@
-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,