Skip to content

Commit

Permalink
Merge branch 'MDL-50892-28' of git://github.com/marinaglancy/moodle i…
Browse files Browse the repository at this point in the history
…nto MOODLE_28_STABLE
  • Loading branch information
stronk7 committed Sep 15, 2015
2 parents 2648522 + 355e943 commit 5d4bccd
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion course/recent.php
Expand Up @@ -212,7 +212,7 @@
echo $OUTPUT->spacer(array('height'=>30, 'br'=>true)); // should be done with CSS instead
}
echo $OUTPUT->box_start();
if (!empty($activity->name)) {
if (strval($activity->name) !== '') {
echo html_writer::tag('h2', $activity->name);
}
$inbox = true;
Expand Down
2 changes: 1 addition & 1 deletion course/rest.php
Expand Up @@ -173,7 +173,7 @@
$module->name = clean_param($title, PARAM_CLEANHTML);
}

if (!empty($module->name)) {
if (strval($module->name) !== '') {
$DB->update_record($cm->modname, $module);
$cm->name = $module->name;
\core\event\course_module_updated::create_from_cm($cm, $modcontext)->trigger();
Expand Down
2 changes: 1 addition & 1 deletion grade/grading/lib.php
Expand Up @@ -185,7 +185,7 @@ public function get_component_title() {
} else if ($this->get_context()->contextlevel >= CONTEXT_COURSE) {
list($context, $course, $cm) = get_context_info_array($this->get_context()->id);

if (!empty($cm->name)) {
if (strval($cm->name) !== '') {
$title = $cm->name;
} else {
debugging('Gradable areas are currently supported at the course module level only', DEBUG_DEVELOPER);
Expand Down
2 changes: 1 addition & 1 deletion lib/classes/event/calendar_event_created.php
Expand Up @@ -104,7 +104,7 @@ protected function validate_data() {
if (!isset($this->other['repeatid'])) {
throw new \coding_exception('The \'repeatid\' value must be set in other.');
}
if (empty($this->other['name'])) {
if (!isset($this->other['name'])) {
throw new \coding_exception('The \'name\' value must be set in other.');
}
if (!isset($this->other['timestart'])) {
Expand Down
2 changes: 1 addition & 1 deletion lib/classes/event/calendar_event_deleted.php
Expand Up @@ -85,7 +85,7 @@ protected function validate_data() {
if (!isset($this->other['repeatid'])) {
throw new \coding_exception('The \'repeatid\' value must be set in other.');
}
if (empty($this->other['name'])) {
if (!isset($this->other['name'])) {
throw new \coding_exception('The \'name\' value must be set in other.');
}
if (!isset($this->other['timestart'])) {
Expand Down
2 changes: 1 addition & 1 deletion lib/classes/event/calendar_event_updated.php
Expand Up @@ -103,7 +103,7 @@ protected function validate_data() {
if (!isset($this->other['repeatid'])) {
throw new \coding_exception('The \'repeatid\' value must be set in other.');
}
if (empty($this->other['name'])) {
if (!isset($this->other['name'])) {
throw new \coding_exception('The \'name\' value must be set in other.');
}
if (!isset($this->other['timestart'])) {
Expand Down
2 changes: 1 addition & 1 deletion lib/grade/grade_item.php
Expand Up @@ -1290,7 +1290,7 @@ public static function fix_duplicate_sortorder($courseid) {
* @return string name
*/
public function get_name($fulltotal=false) {
if (!empty($this->itemname)) {
if (strval($this->itemname) !== '') {
// MDL-10557
return format_string($this->itemname);

Expand Down
2 changes: 1 addition & 1 deletion lib/modinfolib.php
Expand Up @@ -492,7 +492,7 @@ public function __construct($course, $userid) {
// Loop through each piece of module data, constructing it
static $modexists = array();
foreach ($coursemodinfo->modinfo as $mod) {
if (empty($mod->name)) {
if (strval($mod->name) === '') {
// something is wrong here
continue;
}
Expand Down

0 comments on commit 5d4bccd

Please sign in to comment.