Skip to content

Commit ba32348

Browse files
committed
Fix bug #62129 - rfc1867 crashes php even though turned off
Patch by gxd305 at gmail dot com
1 parent eb8c15b commit ba32348

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

NEWS

+2
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ PHP NEWS
7575
should warning). (Yasuo)
7676
. Fixed bug #49175 (mod_files.sh does not support hash bits). Patch by
7777
oorza2k5 at gmail dot com (Yasuo)
78+
. Fixed bug #62129 (rfc1867 crashes php even though turned off). (gxd305 at
79+
gmail dot com)
7880

7981
- Sockets:
8082
. Implemented FR #63472 (Setting SO_BINDTODEVICE with socket_set_option).

ext/session/session.c

+5-2
Original file line numberDiff line numberDiff line change
@@ -2246,8 +2246,11 @@ static PHP_MSHUTDOWN_FUNCTION(session) /* {{{ */
22462246
PHP_MSHUTDOWN(ps_mm) (SHUTDOWN_FUNC_ARGS_PASSTHRU);
22472247
#endif
22482248

2249-
/* restore the orig callback */
2250-
php_rfc1867_callback = php_session_rfc1867_orig_callback;
2249+
/* reset rfc1867 callbacks */
2250+
php_session_rfc1867_orig_callback = NULL;
2251+
if (php_rfc1867_callback == php_session_rfc1867_callback) {
2252+
php_rfc1867_callback = NULL;
2253+
}
22512254

22522255
ps_serializers[PREDEFINED_SERIALIZERS].name = NULL;
22532256
memset(&ps_modules[PREDEFINED_MODULES], 0, (MAX_MODULES-PREDEFINED_MODULES)*sizeof(ps_module *));

0 commit comments

Comments
 (0)