Merge branch 'MDL-78242-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE

This commit is contained in:
Sara Arjona
2023-05-23 17:37:00 +02:00
+1 -1
View File
@@ -900,7 +900,7 @@ class core_course_category implements renderable, cacheable_object, IteratorAggr
// Trigger a purge for all caches listening for changes to category enrolment.
cache_helper::purge_by_event('changesincategoryenrolment');
if (!$CFG->coursecontact || !in_array($roleid, explode(',', $CFG->coursecontact))) {
if (empty($CFG->coursecontact) || !in_array($roleid, explode(',', $CFG->coursecontact))) {
// The role is not one of course contact roles.
return;
}