Issue #3138348 by poker10, awset, mikeytown2: system_batch_page() should call drupal_exit() after drupal_access_denied()
parent
6fbeaa6b35
commit
40d1dbb9f4
|
@ -2398,6 +2398,7 @@ function system_batch_page() {
|
|||
|
||||
if ($output === FALSE) {
|
||||
drupal_access_denied();
|
||||
drupal_exit();
|
||||
}
|
||||
elseif (isset($output)) {
|
||||
// Force a page without blocks or messages to
|
||||
|
|
|
@ -1117,6 +1117,16 @@ class AccessDeniedTestCase extends DrupalWebTestCase {
|
|||
|
||||
// Check that we're still on the same page.
|
||||
$this->assertText(t('Site information'));
|
||||
|
||||
// Check batch page response.
|
||||
$query_parameters = array(
|
||||
':type' => 'php',
|
||||
':severity' => WATCHDOG_WARNING,
|
||||
);
|
||||
$this->assertEqual(db_query('SELECT COUNT(*) FROM {watchdog} WHERE type = :type AND severity = :severity', $query_parameters)->fetchField(), 0, 'No warning message appears in the logs before accessing the batch page.');
|
||||
$this->drupalGet('batch');
|
||||
$this->assertResponse(403);
|
||||
$this->assertEqual(db_query('SELECT COUNT(*) FROM {watchdog} WHERE type = :type AND severity = :severity', $query_parameters)->fetchField(), 0, 'No warning message appears in the logs after accessing the batch page.');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue