diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-03-08 05:16:20 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-03-08 05:16:20 +0000 |
commit | ce81be0c8c50b6939ee45d3860a0d190381068b2 (patch) | |
tree | 61cf3d1a724b916815af50815c8845c89af4b097 /includes | |
parent | d7fa0f82d052ee74ad1d8fa8ab5183078d4ec96b (diff) | |
download | brdo-ce81be0c8c50b6939ee45d3860a0d190381068b2.tar.gz brdo-ce81be0c8c50b6939ee45d3860a0d190381068b2.tar.bz2 |
#292565 by John Morahan and lyricnz: Fix 404 on search form from a 404 page (with tests).
Diffstat (limited to 'includes')
-rw-r--r-- | includes/form.inc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/includes/form.inc b/includes/form.inc index 5e911ed63..159653509 100644 --- a/includes/form.inc +++ b/includes/form.inc @@ -629,6 +629,12 @@ function drupal_redirect_form($form, $redirect = NULL) { } if (!isset($goto) || ($goto !== FALSE)) { if (isset($goto)) { + // Remove any fake destination set by drupal_not_found() or + // drupal_access_denied() so that we can properly redirect from those + // pages. + if (isset($_REQUEST['destination']) && $_REQUEST['destination'] == $_GET['q']) { + unset($_REQUEST['destination']); + } if (is_array($goto)) { call_user_func_array('drupal_goto', $goto); } |