diff --git a/includes/errors.inc b/includes/errors.inc index 7393148..6af8d5d 100644 --- a/includes/errors.inc +++ b/includes/errors.inc @@ -150,12 +150,11 @@ function _drupal_render_exception_safe($exception) { */ function error_displayable($error = NULL) { $error_level = variable_get('error_level', ERROR_REPORTING_DISPLAY_ALL); - $updating = (defined('MAINTENANCE_MODE') && MAINTENANCE_MODE == 'update'); $all_errors_displayed = ($error_level == ERROR_REPORTING_DISPLAY_ALL); $error_needs_display = ($error_level == ERROR_REPORTING_DISPLAY_SOME && isset($error) && $error['%type'] != 'Notice' && $error['%type'] != 'Strict warning'); - return ($updating || $all_errors_displayed || $error_needs_display); + return ($all_errors_displayed || $error_needs_display); } /** diff --git a/modules/simpletest/tests/upgrade/upgrade.test b/modules/simpletest/tests/upgrade/upgrade.test index 784a091..d84e048 100644 --- a/modules/simpletest/tests/upgrade/upgrade.test +++ b/modules/simpletest/tests/upgrade/upgrade.test @@ -491,6 +491,23 @@ class BasicStandardUpdatePath extends UpdatePathTestCase { $result = db_query('SELECT COUNT(*) FROM {menu_links} WHERE link_path = :user_autocomplete', array(':user_autocomplete' => 'user/autocomplete'))->fetchField(); $this->assertFalse($result, 'No {menu_links} entry exists for user/autocomplete'); } + + /** + * Test for error messages on screen during update.php, even when the site is + * configured not to. + */ + public function testErrorsOnUpdatePage() { + variable_set('error_level', ERROR_REPORTING_HIDE); + module_enable(array('poll')); + $location = drupal_get_path('module', 'poll'); + rename($location . '/poll.module', $location . '/foo.module'); + $update_url = $GLOBALS['base_url'] . '/update.php'; + + // Load the first update screen. + $this->drupalGet($update_url, array('external' => TRUE)); + $this->assertNoText('The following module is missing from the file system:'); + } + } /**