From: Roan Kattouw Date: Tue, 3 Jun 2008 10:58:45 +0000 (+0000) Subject: Fixing regression from r35298: wasn't adding enough ampersands. X-Git-Tag: 1.31.0-rc.0~47223 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=7c1e050219b46c3de0777a8ebd2a7973c98bee66;p=lhc%2Fweb%2Fwiklou.git Fixing regression from r35298: wasn't adding enough ampersands. --- 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 );