mirror of
https://github.com/php/php-src.git
synced 2025-01-14 15:54:36 +08:00
Merge branch 'PHP-5.4'
This commit is contained in:
commit
253760bb6b
23
Zend/tests/bug62763.phpt
Normal file
23
Zend/tests/bug62763.phpt
Normal file
@ -0,0 +1,23 @@
|
||||
--TEST--
|
||||
Bug #62763 (register_shutdown_function and extending class)
|
||||
--FILE--
|
||||
<?php
|
||||
class test1 {
|
||||
public function __construct() {
|
||||
register_shutdown_function(array($this, 'shutdown'));
|
||||
}
|
||||
public function shutdown() {
|
||||
exit(__METHOD__);
|
||||
}
|
||||
}
|
||||
|
||||
class test2 extends test1 {
|
||||
public function __destruct() {
|
||||
exit (__METHOD__);
|
||||
}
|
||||
}
|
||||
new test1;
|
||||
new test2;
|
||||
?>
|
||||
--EXPECT--
|
||||
test1::shutdowntest2::__destruct
|
@ -5067,8 +5067,11 @@ void php_free_shutdown_functions(TSRMLS_D) /* {{{ */
|
||||
zend_hash_destroy(BG(user_shutdown_function_names));
|
||||
FREE_HASHTABLE(BG(user_shutdown_function_names));
|
||||
BG(user_shutdown_function_names) = NULL;
|
||||
}
|
||||
zend_end_try();
|
||||
} zend_catch {
|
||||
/* maybe shutdown method call exit, we just ignore it */
|
||||
FREE_HASHTABLE(BG(user_shutdown_function_names));
|
||||
BG(user_shutdown_function_names) = NULL;
|
||||
} zend_end_try();
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user