]> granicus.if.org Git - php/commitdiff
Fix bug #62129 - rfc1867 crashes php even though turned off
authorArpad Ray <arraypad@gmail.com>
Wed, 17 Jul 2013 10:02:48 +0000 (11:02 +0100)
committerArpad Ray <arraypad@gmail.com>
Wed, 17 Jul 2013 10:02:48 +0000 (11:02 +0100)
Patch by gxd305 at gmail dot com

NEWS
ext/session/session.c

diff --git a/NEWS b/NEWS
index fff15a74404b0c9bd6f2da092ba50ff6ae3a7baa..4f6a111f51513f5f139d14e59c69e008897ef008 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -75,6 +75,8 @@ PHP                                                                        NEWS
     should warning). (Yasuo)
   . Fixed bug #49175 (mod_files.sh does not support hash bits). Patch by
     oorza2k5 at gmail dot com (Yasuo)
+  . Fixed bug #62129 (rfc1867 crashes php even though turned off). (gxd305 at
+    gmail dot com)
 
 - Sockets:
   . Implemented FR #63472 (Setting SO_BINDTODEVICE with socket_set_option). 
index 5af3ef2780e0902206ac0c5b8fbd5a361ff8052d..bbfe90e862e146e07da52d3c699ab8faf5d2f944 100644 (file)
@@ -2246,8 +2246,11 @@ static PHP_MSHUTDOWN_FUNCTION(session) /* {{{ */
        PHP_MSHUTDOWN(ps_mm) (SHUTDOWN_FUNC_ARGS_PASSTHRU);
 #endif
 
-       /* restore the orig callback */
-       php_rfc1867_callback = php_session_rfc1867_orig_callback;
+       /* reset rfc1867 callbacks */
+       php_session_rfc1867_orig_callback = NULL;
+       if (php_rfc1867_callback == php_session_rfc1867_callback) {
+               php_rfc1867_callback = NULL;
+       }
 
        ps_serializers[PREDEFINED_SERIALIZERS].name = NULL;
        memset(&ps_modules[PREDEFINED_MODULES], 0, (MAX_MODULES-PREDEFINED_MODULES)*sizeof(ps_module *));