mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Merge branch 'PHP-8.3'
* PHP-8.3: ext/standard: Fix GH-9316
This commit is contained in:
@@ -226,7 +226,7 @@ PHP_FUNCTION(http_build_query)
|
||||
Z_PARAM_ARRAY_OR_OBJECT(formdata)
|
||||
Z_PARAM_OPTIONAL
|
||||
Z_PARAM_STRING(prefix, prefix_len)
|
||||
Z_PARAM_STR(arg_sep)
|
||||
Z_PARAM_STR_OR_NULL(arg_sep)
|
||||
Z_PARAM_LONG(enc_type)
|
||||
ZEND_PARSE_PARAMETERS_END();
|
||||
|
||||
|
||||
17
ext/standard/tests/http/http_build_query/gh12745.phpt
Normal file
17
ext/standard/tests/http/http_build_query/gh12745.phpt
Normal file
@@ -0,0 +1,17 @@
|
||||
--TEST--
|
||||
Bug GH-9316 (http_build_query() default null argument for $arg_separator is implicitly coerced to string)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$data = [
|
||||
'hello' => 'world',
|
||||
'foo' => 'bar',
|
||||
];
|
||||
|
||||
var_dump(http_build_query(
|
||||
$data,
|
||||
encoding_type: PHP_QUERY_RFC3986
|
||||
));
|
||||
?>
|
||||
--EXPECT--
|
||||
string(19) "hello=world&foo=bar"
|
||||
Reference in New Issue
Block a user