-
Bug
-
Resolution: Fixed
-
Minor
-
4.0.6
-
MOODLE_400_STABLE
-
MOODLE_400_STABLE, MOODLE_401_STABLE
-
MDL-77533-401 -
- Covered by automated tests (PHPUnit)
Found while looking at MDL-77532
If the customfield handler isn't present, then we receive an obscure PHP type error:
Fatal error: Uncaught TypeError: stripos(): Argument #1 ($haystack) must be of type string, stdClass given in /opt/moodle/master/src/lib/setuplib.php:580 Stack trace: #0 /opt/moodle/master/src/lib/setuplib.php(580): stripos() #1 /opt/moodle/master/src/lib/setuplib.php(363): get_exception_info() #2 [internal function]: default_exception_handler() #3 {main} thrown in /opt/moodle/master/src/lib/setuplib.php on line 580
|
Instead of the intended exception (once fixed):
Because the arguments passed to the exception constructor are misordered