Fixing regression from r35298: wasn't adding enough ampersands.
authorRoan Kattouw <catrope@users.mediawiki.org>
Tue, 3 Jun 2008 10:58:45 +0000 (10:58 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Tue, 3 Jun 2008 10:58:45 +0000 (10:58 +0000)
includes/GlobalFunctions.php

index 1266bec..446c31b 100644 (file)
@@ -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 );