Skip to content

Commit 0ade1fe

Browse files
committed
ext/standard: Fix GH-19610 (Deprecation warnings in functions taking as argument)
1 parent 5d5ef50 commit 0ade1fe

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

Zend/zend_compile.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7800,6 +7800,8 @@ static void zend_compile_params(zend_ast *ast, zend_ast *return_type_ast, uint32
78007800
ZSTR_VAL(name));
78017801
} else if (zend_string_equals(name, ZSTR_KNOWN(ZEND_STR_THIS))) {
78027802
zend_error_noreturn(E_COMPILE_ERROR, "Cannot use $this as parameter");
7803+
} else if (zend_string_equals_literal(name, "http_response_header")) {
7804+
CG(context).has_assigned_to_http_response_header = true;
78037805
}
78047806

78057807
if (op_array->fn_flags & ZEND_ACC_VARIADIC) {
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
--TEST--
2+
$http_reponse_header as a parameter name should not warn
3+
--FILE--
4+
<?php
5+
6+
function foo($http_response_header) {
7+
var_dump($http_response_header);
8+
}
9+
10+
?>
11+
OK
12+
--EXPECT--
13+
OK

0 commit comments

Comments
 (0)