Ticket #31306: 31306.patch
File 31306.patch, 1.2 KB (added by , 9 years ago) |
---|
-
src/wp-includes/functions.php
782 782 $qs = urlencode_deep( $qs ); // this re-URL-encodes things that were already in the query string 783 783 if ( is_array( $args[0] ) ) { 784 784 $kayvees = $args[0]; 785 $qs = array_ merge( $qs, $kayvees );785 $qs = array_replace( $qs, $kayvees ); 786 786 } else { 787 787 $qs[ $args[0] ] = $args[1]; 788 788 } -
tests/phpunit/tests/functions.php
246 246 } 247 247 248 248 /** 249 * @ticket 31306 250 */ 251 function test_add_query_arg_numeric_keys() { 252 $url = add_query_arg( array( 'foo' => 'bar' ), '1=1' ); 253 $this->assertEquals('1=1&foo=bar', $url); 254 255 $url = add_query_arg( array( 'foo' => 'bar', '1' => '2' ), '1=1' ); 256 $this->assertEquals('1=2&foo=bar', $url); 257 258 $url = add_query_arg( array( '1' => '2' ), 'foo=bar' ); 259 $this->assertEquals('foo=bar&1=2', $url); 260 } 261 262 /** 249 263 * @ticket 21594 250 264 */ 251 265 function test_get_allowed_mime_types() {