summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/session/session.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/session/session.c b/ext/session/session.c
index d546fed0b1..a15549c433 100644
--- a/ext/session/session.c
+++ b/ext/session/session.c
@@ -1088,8 +1088,9 @@ static void php_session_reset_id(TSRMLS_D)
{
int module_number = PS(module_number);
- if (PS(use_cookies)) {
+ if (PS(use_cookies) && PS(send_cookie)) {
php_session_send_cookie(TSRMLS_C);
+ PS(send_cookie) = 0;
}
/* if the SID constant exists, destroy it. */
@@ -1485,6 +1486,7 @@ PHP_FUNCTION(session_regenerate_id)
PS(id) = PS(mod)->s_create_sid(&PS(mod_data), NULL TSRMLS_CC);
+ PS(send_cookie) = 1;
php_session_reset_id(TSRMLS_C);
RETURN_TRUE;