diff options
Diffstat (limited to 'includes')
-rw-r--r-- | includes/common.inc | 5 | ||||
-rw-r--r-- | includes/module.inc | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/includes/common.inc b/includes/common.inc index ceac115a5..ef71ee8b6 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -5212,6 +5212,11 @@ function _drupal_bootstrap_full() { fix_gpc_magic(); // Load all enabled modules module_load_all(); + // Reset drupal_alter() and module_implements() static caches as these + // include implementations for vital modules only when called early on + // in the bootstrap. + drupal_static_reset('drupal_alter'); + drupal_static_reset('module_implements'); // Make sure all stream wrappers are registered. file_get_stream_wrappers(); // Ensure mt_rand is reseeded, to prevent random values from one page load diff --git a/includes/module.inc b/includes/module.inc index 076992ca9..7bf619b47 100644 --- a/includes/module.inc +++ b/includes/module.inc @@ -867,6 +867,11 @@ function module_hook_info() { * @see module_implements() */ function module_implements_write_cache() { + // The list of implementations includes vital modules only before full + // bootstrap, so do not write cache if we are not fully bootstrapped yet. + if (drupal_get_bootstrap_phase() != DRUPAL_BOOTSTRAP_FULL) { + return; + } $implementations = &drupal_static('module_implements'); if (isset($implementations['#write_cache'])) { unset($implementations['#write_cache']); |