mirror of
https://github.com/php/php-src.git
synced 2024-12-12 11:23:53 +08:00
Always initialize the track-vars
This commit is contained in:
parent
c8740575c4
commit
398b1011dc
@ -487,7 +487,6 @@ static char *php_session_encode(int *newlen TSRMLS_DC)
|
|||||||
|
|
||||||
static void php_session_decode(const char *val, int vallen TSRMLS_DC)
|
static void php_session_decode(const char *val, int vallen TSRMLS_DC)
|
||||||
{
|
{
|
||||||
php_session_track_init(TSRMLS_C);
|
|
||||||
if (PS(serializer)->decode(val, vallen TSRMLS_CC) == FAILURE) {
|
if (PS(serializer)->decode(val, vallen TSRMLS_CC) == FAILURE) {
|
||||||
php_session_destroy(TSRMLS_C);
|
php_session_destroy(TSRMLS_C);
|
||||||
php_error(E_WARNING, "Failed to decode session object. Session has been destroyed.");
|
php_error(E_WARNING, "Failed to decode session object. Session has been destroyed.");
|
||||||
@ -554,6 +553,7 @@ static void php_session_initialize(TSRMLS_D)
|
|||||||
php_error(E_ERROR, "Failed to initialize session module");
|
php_error(E_ERROR, "Failed to initialize session module");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
php_session_track_init(TSRMLS_C);
|
||||||
if (PS(mod)->read(&PS(mod_data), PS(id), &val, &vallen) == SUCCESS) {
|
if (PS(mod)->read(&PS(mod_data), PS(id), &val, &vallen) == SUCCESS) {
|
||||||
php_session_decode(val, vallen TSRMLS_CC);
|
php_session_decode(val, vallen TSRMLS_CC);
|
||||||
efree(val);
|
efree(val);
|
||||||
|
Loading…
Reference in New Issue
Block a user