svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/session/session.c branches/PHP_5_4/ext/session/session.c trunk/ext/session/session.c
| From: | Hannes Magnusson | Date: | Mon, 29 Aug 2011 21:20:41 +0000 |
| Subject: | svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/session/session.c branches/PHP_5_4/ext/session/session.c trunk/ext/session/session.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-66018@lists.php.net to get a copy of this message | ||
bjori Mon, 29 Aug 2011 21:20:41 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=315744
Log:
fixed bug #55267 - session_regenerate_id fails after header sent even if session.use_cookies = 0
Bug: https://bugs.php.net/55267 (Closed)
session_regenerate_id fails after header sent even if session.use_cookies = 0
Changed paths:
U php/php-src/branches/PHP_5_3/NEWS
U php/php-src/branches/PHP_5_3/ext/session/session.c
U php/php-src/branches/PHP_5_4/ext/session/session.c
U php/php-src/trunk/ext/session/session.c
Modified: php/php-src/branches/PHP_5_3/NEWS
===================================================================
--- php/php-src/branches/PHP_5_3/NEWS 2011-08-29 21:15:04 UTC (rev 315743)
+++ php/php-src/branches/PHP_5_3/NEWS 2011-08-29 21:20:41 UTC (rev 315744)
@@ -10,6 +10,9 @@
. 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)
Modified: php/php-src/branches/PHP_5_3/ext/session/session.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/session/session.c 2011-08-29 21:15:04 UTC (rev 315743)
+++ php/php-src/branches/PHP_5_3/ext/session/session.c 2011-08-29 21:20:41 UTC (rev 315744)
@@ -1742,7 +1742,7 @@
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;
}
Modified: php/php-src/branches/PHP_5_4/ext/session/session.c
===================================================================
--- php/php-src/branches/PHP_5_4/ext/session/session.c 2011-08-29 21:15:04 UTC (rev 315743)
+++ php/php-src/branches/PHP_5_4/ext/session/session.c 2011-08-29 21:20:41 UTC (rev 315744)
@@ -1670,7 +1670,7 @@
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;
}
Modified: php/php-src/trunk/ext/session/session.c
===================================================================
--- php/php-src/trunk/ext/session/session.c 2011-08-29 21:15:04 UTC (rev 315743)
+++ php/php-src/trunk/ext/session/session.c 2011-08-29 21:20:41 UTC (rev 315744)
@@ -1670,7 +1670,7 @@
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;
}