From: Hannes Magnusson Date: Mon, 29 Aug 2011 21:20:41 +0000 (+0000) Subject: fixed bug #55267 - session_regenerate_id fails after header sent even if session... X-Git-Tag: php-5.3.9RC1~326 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e481f05470605dc35007898a3ed27e3824013dfa;p=php fixed bug #55267 - session_regenerate_id fails after header sent even if session.use_cookies = 0 --- diff --git a/NEWS b/NEWS index 8e5ae39e5a..c8891aa58d 100644 --- a/NEWS +++ b/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) diff --git a/ext/session/session.c b/ext/session/session.c index eb679cd3cb..4b87104129 100644 --- a/ext/session/session.c +++ b/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; }