Commit 1502097b authored by catch's avatar catch

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

parent 7db27664
......@@ -230,6 +230,14 @@ function _memcache_admin_get_bin_for_cluster($cluster) {
function memcache_admin_shutdown() {
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.
if (function_exists('drupal_get_http_header')) {
$header = drupal_get_http_header('content-type');
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment