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 33?? ??? 2012, PHP 5.3.16
44
55- Core:
6+ . Fixed bug #62763 (register_shutdown_function and extending class).
7+ (Laruence)
68 . Fixed bug #62744 (dangling pointers made by zend_disable_class). (Laruence)
79 . Fixed bug #62716 (munmap() is called with the incorrect length).
810
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) /* {{{ */
51085108 zend_hash_destroy (BG (user_shutdown_function_names ));
51095109 FREE_HASHTABLE (BG (user_shutdown_function_names ));
51105110 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 ();
51135116}
51145117/* }}} */
51155118
You can’t perform that action at this time.
0 commit comments