ID: 39381 User updated by: rygorde4 at sbcglobal dot net Reported By: rygorde4 at sbcglobal dot net Status: Open Bug Type: Unknown/Other Function Operating System: Not Applicable PHP Version: 5.2.0 New Comment:
Description: ------------ If functions are called within __destruct without register_shutdown_function being called on __destruct within a class, and global variables (that are assigned classes) called in that class 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 Previous Comments: ------------------------------------------------------------------------ [2006-11-04 19:18:23] rygorde4 at sbcglobal dot net 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 this bug report at http://bugs.php.net/?id=39381&edit=1