From cf86329c7a7efe8401e5f38ecb6bed3815996141 Mon Sep 17 00:00:00 2001 From: David Matamoros Date: Fri, 27 Jan 2023 13:53:29 +0100 Subject: [PATCH] MDL-77058 reportbuilder: Fix for cohort null idnumber column --- cohort/classes/reportbuilder/local/systemreports/cohorts.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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');