diff --git a/lib/moodlelib.php b/lib/moodlelib.php index 07061d61d509a..872e9395350c5 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -10432,8 +10432,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; }