Skip to content

Commit 18f80fb

Browse files
committed
ext/standard: Fix GH-19610 (Deprecation warnings in functions taking as argument)
1 parent dee0042 commit 18f80fb

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed

NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ PHP NEWS
88
- Session:
99
. Fix RC violation of session SID constant deprecation attribute. (ilutov)
1010

11+
- Standard:
12+
. Fix GH-19610 (Deprecation warnings in functions taking as argument).
13+
(Girgias)
14+
1115
- URI:
1216
. Fixed memory management of Uri\WhatWg\Url objects. (timwolla)
1317
. Fixed memory management of the internal "parse_url" URI parser.

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: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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+
foo("OK");
11+
12+
?>
13+
--EXPECT--
14+
string(2) "OK"

0 commit comments

Comments
 (0)