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;
        }

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to