Skip to content
Browse files

fixed bug #55267 - session_regenerate_id fails after header sent even…

… if session.use_cookies = 0
  • Loading branch information...
1 parent f117d56 commit e481f05470605dc35007898a3ed27e3824013dfa @bjori bjori committed
Showing with 4 additions and 1 deletion.
  1. +3 −0 NEWS
  2. +1 −1 ext/session/session.c
View
3 NEWS
@@ -10,6 +10,9 @@ PHP NEWS
. Fixed bug#52013 (Unable to decompress files in a compressed phar). (Hannes)
. Fixed bug#53872 (internal corruption of phar). (Hannes)
+- Session:
+ . Fixed bug #55267 (session_regenerate_id fails after header sent). (Hannes)
+
- NSAPI SAPI:
. Don't set $_SERVER['HTTPS'] on unsecure connection (bug #55403). (Uwe
Schindler)
View
2 ext/session/session.c
@@ -1742,7 +1742,7 @@ static PHP_FUNCTION(session_regenerate_id)
return;
}
- if (SG(headers_sent)) {
+ if (SG(headers_sent) && PS(use_cookies)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot regenerate session id - headers already sent");
RETURN_FALSE;
}

0 comments on commit e481f05

Please sign in to comment.
Something went wrong with that request. Please try again.