diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc index 36bd0fa..f8b440d 100644 --- a/includes/bootstrap.inc +++ b/includes/bootstrap.inc @@ -2764,10 +2764,12 @@ function _drupal_bootstrap_variables() { // url_is_external() requires the variable system to be available. if (isset($_GET['destination']) || isset($_REQUEST['destination'])) { require_once DRUPAL_ROOT . '/includes/common.inc'; - // If the destination is an external URL, remove it. - if (isset($_GET['destination']) && url_is_external($_GET['destination'])) { - unset($_GET['destination']); - unset($_REQUEST['destination']); + if (isset($_GET['destination'])) { + // If the destination is an external URL or a 403/404 page, remove it. + if (url_is_external($_GET['destination']) || in_array($_GET['destination'], array('system/403', 'system/404'))) { + unset($_GET['destination']); + unset($_REQUEST['destination']); + } } // If there's still something in $_REQUEST['destination'] that didn't come // from $_GET, check it too. diff --git a/modules/node/node.test b/modules/node/node.test index 6f0be83..41226c8 100644 --- a/modules/node/node.test +++ b/modules/node/node.test @@ -2093,7 +2093,7 @@ class NodeBlockFunctionalTest extends DrupalWebTestCase { $this->drupalLogout(); $this->drupalLogin($this->web_user); $this->drupalGet(''); - $this->assertNoText($custom_block['title'], t('Block was not displayed on the front page.')); + $this->assertNoText($custom_block['title'], 'Block was not displayed on the front page.'); $this->drupalGet('node/add/article'); $this->assertText($custom_block['title'], 'Block was displayed on the node/add/article page.'); $this->drupalGet('node/' . $node1->nid);