From 594750e15743e9bba0acca322c3abb72a189f99e Mon Sep 17 00:00:00 2001 From: Mihail Geshoski Date: Thu, 8 Aug 2024 16:57:58 +0800 Subject: [PATCH] MDL-82393 mod_assign: Remove the null default value from $course Removes the default null value from the deprecated parameter $course, which was introduced as part of its deprecation. Since PHP 8.0, it is deprecated to declare functions where an optional parameter is followed by a required parameter, as is the case here. Therefore, the default value needs to be removed. --- course/classes/output/actionbar/group_selector.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/course/classes/output/actionbar/group_selector.php b/course/classes/output/actionbar/group_selector.php index 8b80d85874b..26793a9d6da 100644 --- a/course/classes/output/actionbar/group_selector.php +++ b/course/classes/output/actionbar/group_selector.php @@ -39,7 +39,7 @@ class group_selector extends comboboxsearch { * @param null|stdClass $course This parameter has been deprecated since Moodle 4.5 and should not be used anymore. * @param stdClass $context The context object. */ - public function __construct(null|stdClass $course = null, stdClass $context) { + public function __construct(?stdClass $course, stdClass $context) { if ($course !== null) { debugging( 'The course argument has been deprecated. Please remove it from your group_selector class instances.',