Index: simpletest.function.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/Attic/simpletest.function.inc,v retrieving revision 1.1.2.2 diff -u -r1.1.2.2 simpletest.function.inc --- simpletest.function.inc 23 Apr 2009 05:39:51 -0000 1.1.2.2 +++ simpletest.function.inc 28 May 2009 15:47:19 -0000 @@ -125,9 +125,12 @@ * TRUE if the error is fatal. */ function _drupal_log_error($error, $fatal = FALSE) { + $bootstrap_full = function_exists('init_theme'); // Drupal 6. + // Initialize a maintenance theme early if the boostrap was not complete. // Do it early because drupal_set_message() triggers an init_theme(). - if ($fatal && (drupal_get_bootstrap_phase() != DRUPAL_BOOTSTRAP_FULL)) { +// if ($fatal && (drupal_get_bootstrap_phase() != DRUPAL_BOOTSTRAP_FULL)) { + if ($fatal && !$bootstrap_full) { unset($GLOBALS['theme']); if (!defined('MAINTENANCE_MODE')) { define('MAINTENANCE_MODE', 'error'); @@ -170,7 +173,8 @@ if ($fatal) { drupal_set_header('503 Service unavailable'); drupal_set_title(t('Error')); - if (!defined('MAINTENANCE_MODE') && drupal_get_bootstrap_phase() == DRUPAL_BOOTSTRAP_FULL) { +// if (!defined('MAINTENANCE_MODE') && drupal_get_bootstrap_phase() == DRUPAL_BOOTSTRAP_FULL) { + if (!defined('MAINTENANCE_MODE') && $bootstrap_full) { // To conserve CPU and bandwidth, omit the blocks. $page = drupal_get_page(t('The website encountered an unexpected error. Please try again later.')); $page['#show_blocks'] = FALSE;