Created
January 27, 2016 06:42
-
-
Save yohgaki/c3783b22bae9dcb78d69 to your computer and use it in GitHub Desktop.
Session unit test fix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/ext/session/session.c b/ext/session/session.c | |
index c3ea950..867d78e 100644 | |
--- a/ext/session/session.c | |
+++ b/ext/session/session.c | |
@@ -538,9 +538,6 @@ static void php_session_initialize(TSRMLS_D) /* {{{ */ | |
php_session_reset_id(TSRMLS_C); | |
} | |
- /* GC must be done before read */ | |
- php_session_gc(TSRMLS_C); | |
- | |
/* Read data */ | |
php_session_track_init(TSRMLS_C); | |
if (PS(mod)->s_read(&PS(mod_data), PS(id), &val, &vallen TSRMLS_CC) == FAILURE) { | |
@@ -550,6 +547,10 @@ static void php_session_initialize(TSRMLS_D) /* {{{ */ | |
/* php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to read session data: %s (path: %s)", PS(mod)->s_name, PS(save_path)); */ | |
/* return; */ | |
} | |
+ | |
+ /* GC must be done before read */ | |
+ php_session_gc(TSRMLS_C); | |
+ | |
/* Set session ID if session read didn't activated session */ | |
if (PS(use_strict_mode) && PS(session_status) == php_session_none) { | |
php_session_reset_id(TSRMLS_C); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment