From: valentiny510 at yahoo dot es Operating system: XP PHP version: 5.4.5 Package: Scripting Engine problem Bug Type: Bug Bug description:register_shutdown_function and extending class
Description: ------------ Is a little hard to explain becouse are many scenarios where the shutdown function fail or the php doesn't handle correctly the errors but the most simplest method is shown bellow. Normally, without the register_shutdown_function works well, but if I add the function into the __construct and the child class does not have defined the __construct then fail. To work well I need to add the __construct function to the child, but if I dont, why the php doesnt throw me an error with $file, $line etc ? I have many scripts and different scenarios where fail but this I think is the worst becouse it crush all the server. Sorry but I cant provide any backtrace in this moment Test script: --------------- class test1 { public function __construct() { register_shutdown_function(array($this, 'shut')); } public function shutdown() { exit ('Shutdown'); } } class test2 extends test1 { public function __destruct() { exit (__METHOD__); } } new test1; new test2; Expected result: ---------------- test2::__destruct Shutdown or Shutdown test2::__destruct depending of the priority Actual result: -------------- All server crush and restart -- Edit bug report at https://bugs.php.net/bug.php?id=62763&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=62763&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=62763&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=62763&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=62763&r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=62763&r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=62763&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=62763&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=62763&r=needscript Try newer version: https://bugs.php.net/fix.php?id=62763&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=62763&r=support Expected behavior: https://bugs.php.net/fix.php?id=62763&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=62763&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=62763&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=62763&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=62763&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=62763&r=dst IIS Stability: https://bugs.php.net/fix.php?id=62763&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=62763&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=62763&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=62763&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=62763&r=mysqlcfg