com php-src: Merge branch 'PHP-7.0': ext/session/session.c
| From: | Anatol Belski | Date: | Fri, 29 Jan 2016 14:19:40 +0000 |
| Subject: | com php-src: Merge branch 'PHP-7.0': ext/session/session.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-90796@lists.php.net to get a copy of this message | ||
Commit: 15ba618a694e151e6bd17f70dee0cd19084b9978
Author: Anatol Belski <ab@php.net> Fri, 29 Jan 2016 15:19:40 +0100
Parents: 55fd320b31c3ea0afdd379a949b984ecd4f5b8c7 d2c752d7e9134c0db1045d3ee244c5d1ee4eaba9
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=15ba618a694e151e6bd17f70dee0cd19084b9978
Log:
Merge branch 'PHP-7.0'
* PHP-7.0:
fix wrong gc sequence
Changed paths:
MM ext/session/session.c
Diff:
diff --cc ext/session/session.c
index b7a1611,d67045e..5f44f99
--- a/ext/session/session.c
+++ b/ext/session/session.c
@@@ -556,19 -541,21 +556,20 @@@ static void php_session_initialize(void
}
php_session_reset_id();
- PS(session_status) = php_session_active;
- /* 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) {
+ php_session_abort();
/* Some broken save handler implementation returns FAILURE for non-existent session ID */
/* It's better to raise error for this, but disabled error for better compatibility */
- /*
- php_error_docref(NULL, E_NOTICE, "Failed to read session data: %s (path: %s)",
PS(mod)->s_name, PS(save_path));
- */
+ 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;