From: rygorde4 at sbcglobal dot net Operating system: Not Applicable PHP version: 5.2.0 PHP Bug Type: Unknown/Other Function Bug description: __destruct bug
Description: ------------ If functions are called within __destruct without register_shutdown_function being called on __destruct within a class, and global variables that are classes will not work. This is a bug specificly with PHP 5.2.0. This bug was reported multiple times at my discussion system (here http://community.mybboard.net/showthread.php?tid=13506 and here http://community.mybboard.net/showthread.php?tid=12430). Calling register_shutdown_function on __destruct, I was able to use that as a workaround, but the problem remains with __destruct. Please contact me with any information you need, and I will gladly assist you. Reproduce code: --------------- You can install a fresh version of MyBB 1.2 here: http://mybboard.com/downloads.php using PHP 5.2.0. The problems lay in inc/class_core.php Expected result: ---------------- No error, shutdown functions should run properly Actual result: -------------- Fatal error: Call to a member function run_hooks() on a non-object in /www/xxx/pub/inc/functions.php on line 146 -- Edit bug report at http://bugs.php.net/?id=39381&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=39381&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=39381&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=39381&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=39381&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=39381&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=39381&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=39381&r=needscript Try newer version: http://bugs.php.net/fix.php?id=39381&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=39381&r=support Expected behavior: http://bugs.php.net/fix.php?id=39381&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=39381&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=39381&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=39381&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=39381&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=39381&r=dst IIS Stability: http://bugs.php.net/fix.php?id=39381&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=39381&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=39381&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=39381&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=39381&r=mysqlcfg