Skip to content

Commit c5d4285

Browse files
AlliBalliBabadunglas
authored andcommitted
Removes sessions from symbol table.
1 parent 73f7004 commit c5d4285

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

frankenphp.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,9 @@ static void frankenphp_reset_super_globals() {
119119
zval *files = &PG(http_globals)[TRACK_VARS_FILES];
120120
zval_ptr_dtor_nogc(files);
121121
memset(files, 0, sizeof(*files));
122+
123+
/* $_SESSION must be explicitly deleted from the symbol table. */
124+
zend_hash_str_del(&EG(symbol_table), "_SESSION", sizeof("_SESSION") - 1);
122125
}
123126
zend_end_try();
124127

@@ -301,9 +304,6 @@ bool frankenphp_shutdown_dummy_request(void) {
301304
return false;
302305
}
303306

304-
/* Snapshot INI and session handlers BEFORE shutdown.
305-
* The framework has set these up before the worker loop, and we want
306-
* to preserve them. Session RSHUTDOWN will free the handlers. */
307307
frankenphp_snapshot_ini();
308308

309309
frankenphp_worker_request_shutdown();

0 commit comments

Comments
 (0)