From 7c1e050219b46c3de0777a8ebd2a7973c98bee66 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Tue, 3 Jun 2008 10:58:45 +0000 Subject: [PATCH] Fixing regression from r35298: wasn't adding enough ampersands. --- includes/GlobalFunctions.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 1266bec2dc..446c31b48a 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -1000,9 +1000,16 @@ function wfArrayToCGI( $array1, $array2 = NULL ) $cgi .= '&'; } if(is_array($value)) + { + $firstTime = true; foreach($value as $v) - $cgi .= urlencode( $key . '[]' ) . '=' . + { + $cgi .= ($firstTime ? '' : '&') . + urlencode( $key . '[]' ) . '=' . urlencode( $v ); + $firstTime = false; + } + } else $cgi .= urlencode( $key ) . '=' . urlencode( $value ); -- 2.20.1