Skip to content

Commit d36b029

Browse files
committed
Merge branch 'PHP-8.4'
* PHP-8.4: Fix phpGH-18400: http_build_query type error is inaccurate
2 parents 4f10973 + 7a2bef0 commit d36b029

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ext/standard/http.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ PHP_FUNCTION(http_build_query)
246246
ZEND_PARSE_PARAMETERS_END();
247247

248248
if (UNEXPECTED(Z_TYPE_P(formdata) == IS_OBJECT && (Z_OBJCE_P(formdata)->ce_flags & ZEND_ACC_ENUM))) {
249-
zend_argument_type_error(1, "must be of type array, %s given", zend_zval_value_name(formdata));
249+
zend_argument_type_error(1, "must not be an enum, %s given", zend_zval_value_name(formdata));
250250
RETURN_THROWS();
251251
}
252252

ext/standard/tests/http/gh15650.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ try {
3333
--EXPECT--
3434
e1=hello+world%21&e2=42
3535
ValueError: Unbacked enum E3 cannot be converted to a string
36-
TypeError: http_build_query(): Argument #1 ($data) must be of type array, E1 given
36+
TypeError: http_build_query(): Argument #1 ($data) must not be an enum, E1 given

0 commit comments

Comments
 (0)