mirror of
https://github.com/php/php-src.git
synced 2026-03-31 20:53:00 +02:00
Merge branch 'PHP-7.0'
* PHP-7.0: fix wrong gc sequence
This commit is contained in:
@@ -557,9 +557,6 @@ static void php_session_initialize(void) /* {{{ */
|
||||
|
||||
php_session_reset_id();
|
||||
|
||||
/* GC must be done before read */
|
||||
php_session_gc();
|
||||
|
||||
/* Read data */
|
||||
php_session_track_init();
|
||||
if (PS(mod)->s_read(&PS(mod_data), PS(id), &val, PS(gc_maxlifetime)) == FAILURE) {
|
||||
@@ -569,6 +566,10 @@ static void php_session_initialize(void) /* {{{ */
|
||||
php_error_docref(NULL, E_WARNING, "Failed to read session data: %s (path: %s)", PS(mod)->s_name, PS(save_path));
|
||||
return;
|
||||
}
|
||||
|
||||
/* GC must be done after read */
|
||||
php_session_gc();
|
||||
|
||||
if (PS(session_vars)) {
|
||||
zend_string_release(PS(session_vars));
|
||||
PS(session_vars) = NULL;
|
||||
|
||||
Reference in New Issue
Block a user