Merge branch 'MDL-33562-23' of git://github.com/danpoltawski/moodle into MOODLE_23_STABLE
[moodle.git] / lib / moodlelib.php
index 62f5d26..a1f8a0a 100644 (file)
@@ -10346,6 +10346,11 @@ function get_performance_info() {
     $info['html'] .= '<span class="included">Included '.$info['includecount'].' files</span> ';
     $info['txt']  .= 'includecount: '.$info['includecount'].' ';
 
+    if (!empty($CFG->early_install_lang) or empty($PAGE)) {
+        // We can not track more performance before installation or before PAGE init, sorry.
+        return $info;
+    }
+
     $filtermanager = filter_manager::instance();
     if (method_exists($filtermanager, 'get_performance_summary')) {
         list($filterinfo, $nicenames) = $filtermanager->get_performance_summary();