MDL-59599 navigation: Strict zero-position comparision
authorDavid Monllao <davidm@moodle.com>
Mon, 9 Jul 2018 10:27:25 +0000 (12:27 +0200)
committerDavid Monllao <davidm@moodle.com>
Mon, 9 Jul 2018 10:27:25 +0000 (12:27 +0200)
lib/navigationlib.php

index f2f4cb1..3ec8ccc 100644 (file)
@@ -2733,7 +2733,7 @@ class global_navigation extends navigation_node {
             $gradenode = $coursenode->add(get_string('grades'), $url, self::TYPE_SETTING, null,
                 'grades', new pix_icon('i/grades', ''));
             // If the page type matches the grade part, then make the nav drawer grade node (incl. all sub pages) active.
-            if (strpos($this->page->pagetype, 'grade-') == 0) {
+            if (strpos($this->page->pagetype, 'grade-') === 0) {
                 $gradenode->make_active();
             }
         }