Changeset 31966
- Timestamp:
- 04/01/2015 07:14:46 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/functions.php
r31891 r31966 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]; -
trunk/tests/phpunit/tests/functions.php
r31311 r31966 257 257 258 258 $_SERVER['REQUEST_URI'] = $old_req_uri; 259 } 260 261 /** 262 * @ticket 31306 263 */ 264 function test_add_query_arg_numeric_keys() { 265 $url = add_query_arg( array( 'foo' => 'bar' ), '1=1' ); 266 $this->assertEquals('1=1&foo=bar', $url); 267 268 $url = add_query_arg( array( 'foo' => 'bar', '1' => '2' ), '1=1' ); 269 $this->assertEquals('1=2&foo=bar', $url); 270 271 $url = add_query_arg( array( '1' => '2' ), 'foo=bar' ); 272 $this->assertEquals('foo=bar&1=2', $url); 259 273 } 260 274
Note: See TracChangeset
for help on using the changeset viewer.