Skip to content
Snippets Groups Projects
Commit 1502097b authored by catch's avatar catch
Browse files

Issue #616282 by longwave: avoid calling theme() if the theme system wasn't initiatilized.

parent 7db27664
No related branches found
No related tags found
No related merge requests found
...@@ -230,6 +230,14 @@ function _memcache_admin_get_bin_for_cluster($cluster) { ...@@ -230,6 +230,14 @@ function _memcache_admin_get_bin_for_cluster($cluster) {
function memcache_admin_shutdown() { function memcache_admin_shutdown() {
global $_memcache_statistics; global $_memcache_statistics;
// Don't call theme() during shutdown if the registry has been rebuilt (such
// as when enabling/disabling modules on admin/build/modules) as things break.
// Instead, simply exit without displaying admin statistics for this page
// load. See http://drupal.org/node/616282 for discussion.
if (!function_exists('theme_get_registry') || !theme_get_registry()) {
return;
}
// Try not to break non-HTML pages. // Try not to break non-HTML pages.
if (function_exists('drupal_get_http_header')) { if (function_exists('drupal_get_http_header')) {
$header = drupal_get_http_header('content-type'); $header = drupal_get_http_header('content-type');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment