-
Sub-task
-
Resolution: Fixed
-
Minor
-
4.1
-
MOODLE_401_STABLE
-
MOODLE_401_STABLE
-
MDL-76112-master -
Can not pass null as the third parameter ($limit) of preg_split in PHP 8.1
https://php.watch/versions/8.1/internal-func-non-nullable-null-deprecation
To bring another example, preg_split function has a third parameter int $limit = -1. Passing null to this parameter emits a deprecation notice in PHP 8.1, and the sensible upgrade to this call would be setting $limit parameter to -1.
https://github.com/moodle/moodle/blob/master/lib/form/classes/filetypes_util.php#L71
https://github.com/moodle/moodle/blob/master/lib/tests/messageinbound_test.php#L118
https://github.com/moodle/moodle/blob/master/admin/tool/certificate/classes/certificate.php#L425
https://github.com/moodle/moodle/blob/master/mod/workshop/locallib.php#L456
https://github.com/moodle/moodle/blob/master/question/type/gapselect/questiontypebase.php#L184
https://github.com/moodle/moodle/blob/master/question/type/multianswer/questiontype.php#L283