diff --git a/lib/moodlelib.php b/lib/moodlelib.php index 0d396a4a716ea..463787578a241 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -10609,8 +10609,8 @@ function get_performance_info() { $info['html'] .= 'Included '.$info['includecount'].' files '; $info['txt'] .= 'includecount: '.$info['includecount'].' '; - if (!empty($CFG->early_install_lang)) { - // We can not track more performance before installation, sorry. + if (!empty($CFG->early_install_lang) or empty($PAGE)) { + // We can not track more performance before installation or before PAGE init, sorry. return $info; }