[wp-trac] [WordPress Trac] #15213: Post WP3.1 PHP 5 register_shutdown_function() note - Remove Backwards compability
WordPress Trac
wp-trac at lists.automattic.com
Mon Oct 25 19:36:55 UTC 2010
#15213: Post WP3.1 PHP 5 register_shutdown_function() note - Remove Backwards
compability
--------------------------+-------------------------------------------------
Reporter: hakre | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 3.1
Severity: normal | Keywords: needs-patch
--------------------------+-------------------------------------------------
In some classes (DB, Cache) register_shutdown_function() is used to mimic
__destruct() in PHP 4 so it looks appropriate to remove that when
wordpress codebase becomes PHP 5.2+.
But in fact the register_shutdown_function() probably must be kept for
backwards compatibility, bećause __desctruct() is not called in PHP 5.2+
in all cases in which register_shutdown_function() registered functions
are called.
So to remove the shutdown hook will break backwards compatibility because
it is buggy for a mimic of __destruct().
I suggest to remove this buggy implementation and break with backwards
compatibility.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/15213>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list