Skip to content
Snippets Groups Projects
Commit 6c862208 authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Fixed small glitch in drupal_goto(): somethimes a "&" got appended.  Patch
  by Marco.
parent e2869eca
Branches
Tags
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -314,19 +314,19 @@ function drupal_goto($url) {
** is compiled with "--enable-trans-sid".
*/
if (ini_get("session.use_trans_sid")) {
$sid = session_name() . "=" . session_id();
}
if (!session_id() || strstr($url, $sid)) {
if (!ini_get("session.use_trans_sid") || !session_id() || strstr($url, $sid)) {
header("Location: $url");
}
else if (strstr($url, "?") && !strstr($url, $sid)) {
else {
$sid = session_name() . "=" . session_id();
if (strstr($url, "?") && !strstr($url, $sid)) {
header("Location: $url&". $sid);
}
else {
header("Location: $url?". $sid);
}
}
/*
** The "Location" header sends a REDIRECT status code to the http
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment