-
Bug
-
Resolution: Fixed
-
Major
-
3.6.4, 3.7, 3.8
-
MOODLE_36_STABLE, MOODLE_37_STABLE, MOODLE_38_STABLE
-
MOODLE_38_STABLE
-
When looking for some "blank page" recent problems (see MDL-65995), happening really early in the bootstrap/warmup moodle code... it was detected that the default_exception_handler uses some stuff that is not guaranteed to be available at the moment the exception happens.
This is the list of errors that we detected:
[21-Jun-2019 08:09:41 UTC] PHP Fatal error: Uncaught Error: Call to undefined function current_language() in /Applications/MAMP/htdocs/master/lib/setuplib.php:688
|
Stack trace:
|
#0 /Applications/MAMP/htdocs/master/lib/setuplib.php(572): get_docs_url()
|
#1 /Applications/MAMP/htdocs/master/lib/setuplib.php(363): get_exception_info(Object(Error))
|
#2 [internal function]: default_exception_handler(Object(Error))
|
#3 {main}
|
thrown in /Applications/MAMP/htdocs/master/lib/setuplib.php on line 688
|
Once we commented out get_docs_url() we got:
[21-Jun-2019 08:38:04 UTC] PHP Fatal error: Uncaught Error: Call to undefined function debugging() in /Applications/MAMP/htdocs/master/lib/setuplib.php:365
|
Stack trace:
|
#0 [internal function]: default_exception_handler(Object(Error))
|
#1 {main}
|
thrown in /Applications/MAMP/htdocs/master/lib/setuplib.php on line 365
|
And, once we replaced that debugging(), we finally were able to see the real error happening (that was MDL-65995).
So this issue is about to guarantee that when a error happens early in Moodle bootstrap/warmup and the default_exception_handler is called... it's immune to any dependency that could not be available yet.
Ciao