diff --git a/cohort/classes/reportbuilder/local/systemreports/cohorts.php b/cohort/classes/reportbuilder/local/systemreports/cohorts.php index 785953b2f21..66c44097cbb 100644 --- a/cohort/classes/reportbuilder/local/systemreports/cohorts.php +++ b/cohort/classes/reportbuilder/local/systemreports/cohorts.php @@ -139,7 +139,7 @@ class cohorts extends system_report { ->set_type(column::TYPE_TEXT) ->set_is_sortable(true) ->add_fields("{$entitymainalias}.idnumber, {$entitymainalias}.id, {$entitymainalias}.contextid") - ->add_callback(static function(string $idnumber, stdClass $cohort): string { + ->add_callback(static function(?string $idnumber, stdClass $cohort): string { global $OUTPUT, $PAGE; $renderer = $PAGE->get_renderer('core');