diff --git a/ext/session/php_session.h b/ext/session/php_session.h index f8e511082a6..8a0d2ed27b8 100644 --- a/ext/session/php_session.h +++ b/ext/session/php_session.h @@ -120,7 +120,6 @@ typedef enum { } php_session_status; typedef struct _php_session_rfc1867_progress { - size_t sname_len; zval sid; smart_str key; diff --git a/ext/session/session.c b/ext/session/session.c index 695f6c01967..33cc6cd4b7d 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -3013,7 +3013,7 @@ static bool early_find_sid_in(zval *dest, int where, php_session_rfc1867_progres return 0; } - if ((ppid = zend_hash_str_find(Z_ARRVAL(PG(http_globals)[where]), ZSTR_VAL(PS(session_name)), progress->sname_len)) + if ((ppid = zend_hash_find(Z_ARRVAL(PG(http_globals)[where]), PS(session_name))) && Z_TYPE_P(ppid) == IS_STRING) { zval_ptr_dtor(dest); ZVAL_COPY_DEREF(dest, ppid); @@ -3121,7 +3121,6 @@ static zend_result php_session_rfc1867_callback(unsigned int event, void *event_ multipart_event_start *data = (multipart_event_start *) event_data; progress = ecalloc(1, sizeof(php_session_rfc1867_progress)); progress->content_length = data->content_length; - progress->sname_len = ZSTR_LEN(PS(session_name)); PS(rfc1867_progress) = progress; } break;