From 9781d5f392f5fb61a928cfe2520fed4f5ffacbfb Mon Sep 17 00:00:00 2001 From: Andrew Nicols Date: Fri, 22 Nov 2024 08:36:14 +0800 Subject: [PATCH] MDL-83786 navigation: Correct incorrect paren in navfilter This condition was checking whether navgfilter was true, and the stringfilter was also true. In most cases the condition will have actually worked correctly, albeit by fluke. For users upgrading or otherwise missing the navfilter configuration this condition led to warnings. --- lib/classes/output/core_renderer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/classes/output/core_renderer.php b/lib/classes/output/core_renderer.php index 7a92c6f43fe..0e8ea1711b7 100644 --- a/lib/classes/output/core_renderer.php +++ b/lib/classes/output/core_renderer.php @@ -3488,7 +3488,7 @@ EOD; } // If filtering of the primary custom menu is enabled, apply only the string filters. - if (!empty($CFG->navfilter && !empty($CFG->stringfilters))) { + if (!empty($CFG->navfilter) && !empty($CFG->stringfilters)) { // Apply filters that are enabled for Content and Headings. $filtermanager = \filter_manager::instance(); $custommenuitems = $filtermanager->filter_string($custommenuitems, \context_system::instance()); @@ -3511,7 +3511,7 @@ EOD; } // If filtering of the primary custom menu is enabled, apply only the string filters. - if (!empty($CFG->navfilter && !empty($CFG->stringfilters))) { + if (!empty($CFG->navfilter) && !empty($CFG->stringfilters)) { // Apply filters that are enabled for Content and Headings. $filtermanager = \filter_manager::instance(); $custommenuitems = $filtermanager->filter_string($custommenuitems, \context_system::instance());