Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'MDL-33681_22' of git://github.com/timhunt/moodle into M…

…OODLE_22_STABLE
  • Loading branch information...
commit 897329c2473d330cc5809dacf23e6fe2ed70e331 2 parents 89c3d84 + 8ad93ce
@stronk7 stronk7 authored
Showing with 3 additions and 3 deletions.
  1. +2 −2 course/format/topics/lib.php
  2. +1 −1  course/format/weeks/lib.php
View
4 course/format/topics/lib.php
@@ -69,7 +69,7 @@ function callback_topics_request_key() {
function callback_topics_get_section_name($course, $section) {
// We can't add a node without any text
- if (!empty($section->name)) {
+ if ((string)$section->name !== '') {
return format_string($section->name, true, array('context' => get_context_instance(CONTEXT_COURSE, $course->id)));
} else if ($section->section == 0) {
return get_string('section0name', 'format_topics');
@@ -100,4 +100,4 @@ function callback_topics_ajax_support() {
*/
function callback_topics_get_section_url($courseid, $sectionnum) {
return new moodle_url('/course/view.php', array('id' => $courseid, 'topic' => $sectionnum));
-}
+}
View
2  course/format/weeks/lib.php
@@ -76,7 +76,7 @@ function callback_weeks_request_key() {
*/
function callback_weeks_get_section_name($course, $section) {
// We can't add a node without text
- if (!empty($section->name)) {
+ if ((string)$section->name !== '') {
// Return the name the user set
return format_string($section->name, true, array('context' => get_context_instance(CONTEXT_COURSE, $course->id)));
} else if ($section->section == 0) {
Please sign in to comment.
Something went wrong with that request. Please try again.