File tree Expand file tree Collapse file tree 3 files changed +30
-2
lines changed Expand file tree Collapse file tree 3 files changed +30
-2
lines changed Original file line number Diff line number Diff line change 3
3
?? ??? 2012, PHP 5.3.16
4
4
5
5
- Core:
6
+ . Fixed bug #62763 (register_shutdown_function and extending class).
7
+ (Laruence)
6
8
. Fixed bug #62744 (dangling pointers made by zend_disable_class). (Laruence)
7
9
. Fixed bug #62716 (munmap() is called with the incorrect length).
8
10
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ Bug #62763 (register_shutdown_function and extending class)
3
+ --FILE--
4
+ <?php
5
+ class test1 {
6
+ public function __construct () {
7
+ register_shutdown_function (array ($ this , 'shutdown ' ));
8
+ }
9
+ public function shutdown () {
10
+ exit (__METHOD__ );
11
+ }
12
+ }
13
+
14
+ class test2 extends test1 {
15
+ public function __destruct () {
16
+ exit (__METHOD__ );
17
+ }
18
+ }
19
+ new test1 ;
20
+ new test2 ;
21
+ ?>
22
+ --EXPECT--
23
+ test1::shutdowntest2::__destruct
Original file line number Diff line number Diff line change @@ -5108,8 +5108,11 @@ void php_free_shutdown_functions(TSRMLS_D) /* {{{ */
5108
5108
zend_hash_destroy (BG (user_shutdown_function_names ));
5109
5109
FREE_HASHTABLE (BG (user_shutdown_function_names ));
5110
5110
BG (user_shutdown_function_names ) = NULL ;
5111
- }
5112
- zend_end_try ();
5111
+ } zend_catch {
5112
+ /* maybe shutdown method call exit, we just ignore it */
5113
+ FREE_HASHTABLE (BG (user_shutdown_function_names ));
5114
+ BG (user_shutdown_function_names ) = NULL ;
5115
+ } zend_end_try ();
5113
5116
}
5114
5117
/* }}} */
5115
5118
You can’t perform that action at this time.
0 commit comments