Skip to content

Commit d50ce61

Browse files
henderkesdunglas
authored andcommitted
reset headers_sent flags on embed sapi startup
1 parent 1055f1c commit d50ce61

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

frankenphp.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1621,6 +1621,10 @@ static void *execute_script_cli(void *arg) {
16211621

16221622
php_embed_init(cli_argc, cli_argv);
16231623

1624+
// php_embed_init() forces SG(headers_sent) = 1 and no_headers = 1
1625+
SG(headers_sent) = 0;
1626+
SG(request_info).no_headers = 0;
1627+
16241628
cli_register_file_handles();
16251629
zend_first_try {
16261630
if (eval) {

0 commit comments

Comments
 (0)