MDL-55362 core: Fixed topic section default name empty h2 tag
authorMathew May <mathewm@hotmail.co.nz>
Fri, 4 Nov 2016 01:18:21 +0000 (14:18 +1300)
committerMathew May <mathewm@hotmail.co.nz>
Wed, 16 Nov 2016 01:19:55 +0000 (14:19 +1300)
index.php

index 7167e9a..0c9e490 100644 (file)
--- a/index.php
+++ b/index.php
@@ -147,7 +147,7 @@ if (!empty($CFG->customfrontpageinclude)) {
         $context = context_course::instance(SITEID);
 
         // If the section name is set we show it.
-        if (!is_null($section->name)) {
+        if (trim($section->name) !== '') {
             echo $OUTPUT->heading(
                 format_string($section->name, true, array('context' => $context)),
                 2,