Skip to content

Commit 5e131f1

Browse files
committed
Review comments
1 parent 3b716b4 commit 5e131f1

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

Zend/zend_compile.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2885,8 +2885,8 @@ static zend_result zend_try_compile_cv(znode *result, zend_ast *ast, uint32_t ty
28852885
return FAILURE;
28862886
}
28872887

2888-
if (zend_string_equals_literal(name, "http_response_header")) {
2889-
if (type == BP_VAR_R && !CG(has_assigned_to_http_response_header)) {
2888+
if (!CG(has_assigned_to_http_response_header) && zend_string_equals_literal(name, "http_response_header")) {
2889+
if (type == BP_VAR_R) {
28902890
zend_error(E_DEPRECATED,
28912891
"The predefined locally scoped $http_response_header variable is deprecated,"
28922892
" call http_get_last_response_headers() instead");
@@ -3457,7 +3457,6 @@ static void zend_compile_assign(znode *result, zend_ast *ast) /* {{{ */
34573457
if (is_this_fetch(var_ast)) {
34583458
zend_error_noreturn(E_COMPILE_ERROR, "Cannot re-assign $this");
34593459
}
3460-
// TODO: Mark assignment to http_response_header?
34613460

34623461
zend_ensure_writable_variable(var_ast);
34633462

ext/standard/tests/http/http_response_header_deprecated_bypass.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
--TEST--
2-
$http_reponse_header using suggested cross-compatible version workaround
2+
Ensure suggested cross-version compatible code for $http_reponse_header provided by the RFC works
33
--SKIPIF--
44
<?php require 'server.inc'; http_server_skipif(); ?>
55
--INI--

0 commit comments

Comments
 (0)