From 07c587d1278f6f67e911ba1847a357e4df134015 Mon Sep 17 00:00:00 2001
From: Dries Buytaert <dries@buytaert.net>
Date: Sun, 30 Sep 2001 11:40:49 +0000
Subject: [PATCH] - small bugfix in drupal_goto

---
 includes/common.inc | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/includes/common.inc b/includes/common.inc
index 776e113b3e70..e441b3f30276 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -79,7 +79,12 @@ function drupal_goto($url) {
   ** is compiled with "--enable-trans-sid".
   */
 
-  header("Location: $url&". SID);
+  if (strstr($url, "?")) {
+    header("Location: $url&". SID);
+  }
+  else {
+    header("Location: $url?". SID);
+  }
 }
 
 function check_form($text) {
-- 
GitLab