ID: 39381 Updated by: [EMAIL PROTECTED] Reported By: rygorde4 at sbcglobal dot net -Status: Feedback +Status: Bogus Bug Type: Unknown/Other Function Operating System: Not Applicable PHP Version: 5.2.0 New Comment:
There is no certain order of object destruction, there never was and this is explained in many other reports. You have to take care of the correct destruction order yourself. Previous Comments: ------------------------------------------------------------------------ [2006-11-10 16:08:11] tikitiki at mybboard dot com Reproduce code: --------------- <?php function run_shutdown() { global $x; echo __FUNCTION__."\n"; $x->do_something(); } class Foo { function do_something() { echo "hi\n"; } function __destruct() { echo __METHOD__."\n"; } } class Bar { function __destruct() { run_shutdown(); echo __METHOD__."\n"; } } $y = new Bar(); $x = new Foo(); ?> Expected result: ---------------- Bar::__destruct run_shutdown hi Foo::__destruct Actual result: -------------- Foo::__destruct run_shutdown Fatal error: Call to a member function do_something() on a non-object in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\test.php on line 5 ------------------------------------------------------------------------ [2006-11-09 02:37:47] Nikolas dot hagelstein at gmail dot com Same at wordpress 2.05 using php5.2: PHP Fatal error: Call to a member function get() on a non-object in /var/www/www.trashboard.de/htdocs /wp-includes/cache.php on line 28 Reverting to 5.1.6 made it work again ------------------------------------------------------------------------ [2006-11-08 13:44:38] [EMAIL PROTECTED] Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with <?php and ends with ?>, is max. 10-20 lines long and does not require any external resources such as databases, etc. If the script requires a database to demonstrate the issue, please make sure it creates all necessary tables, stored procedures etc. Please avoid embedding huge scripts into the report. ------------------------------------------------------------------------ [2006-11-06 16:46:52] harveyelliott at hotmail dot com I currently get a issue with php 5.2 with ZenCart. I roll back to php 5.1.6 and it works fine... of course its all due to this php 5.2 bug... Im curently stuck in a hard place.. because.. Im a Web Hosting provider.. So either.. I run php 5.2 to get the security fixes and my customers are SOL that has issues with this bug.. Or.. run insecure code to keep my customers happy.. My question is.. any idea when this is going to be fixed? If I asked in the wrong place... please direct me to the correct place... as this is very important to me... ------------------------------------------------------------------------ [2006-11-06 13:42:19] c dot boulton at mybboard dot com Maybe relates to this? http://bugs.php.net/bug.php?id=36759 ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/39381 -- Edit this bug report at http://bugs.php.net/?id=39381&edit=1