File tree Expand file tree Collapse file tree 3 files changed +21
-2
lines changed
tests/http/http_build_query Expand file tree Collapse file tree 3 files changed +21
-2
lines changed Original file line number Diff line number Diff line change 2
2
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3
3
?? ??? ????, PHP 8.3.1
4
4
5
-
5
+ - Standard
6
+ . Fixed GH-9316 (http_build_query() default null argument for $arg_separator
7
+ is implicitly coerced to string). (Girgias)
6
8
7
9
23 Nov 2023, PHP 8.3.0
8
10
Original file line number Diff line number Diff line change @@ -226,7 +226,7 @@ PHP_FUNCTION(http_build_query)
226
226
Z_PARAM_ARRAY_OR_OBJECT (formdata )
227
227
Z_PARAM_OPTIONAL
228
228
Z_PARAM_STRING (prefix , prefix_len )
229
- Z_PARAM_STR (arg_sep )
229
+ Z_PARAM_STR_OR_NULL (arg_sep )
230
230
Z_PARAM_LONG (enc_type )
231
231
ZEND_PARSE_PARAMETERS_END ();
232
232
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ Bug GH-9316 (http_build_query() default null argument for $arg_separator is implicitly coerced to string)
3
+ --FILE--
4
+ <?php
5
+
6
+ $ data = [
7
+ 'hello ' => 'world ' ,
8
+ 'foo ' => 'bar ' ,
9
+ ];
10
+
11
+ var_dump (http_build_query (
12
+ $ data ,
13
+ encoding_type: PHP_QUERY_RFC3986
14
+ ));
15
+ ?>
16
+ --EXPECT--
17
+ string(19) "hello=world&foo=bar"
You can’t perform that action at this time.
0 commit comments