register_shutdown_function isn't run in SHORTINIT mode
|Reported by:||jtclarke||Owned by:||ryan|
I was noticing problems upgrading from 2.9.2 MU to 3.0.4 where some of my images weren't loading correctly through ms-files.php when I enabled the drop-in object-cache.php (in my case Ryan et al's memcache client).
I tracked the problem down to an inconsistency between MU and the new 3.0 codebase in the wp-settings.php file.
The problem is that if the SHORTINIT constant is set (as it is in ms-files.php), it returns false (at line 94) before we the shutdown function is registered (line 271). The shutdown function primarily takes care of object cash closing -- which needs to take place in both the short and regular load sequences.
donncha fixed this in the MU codebase at revision 1582 in the wordpress-mu SVN tree (between 2.6 and 2.7), but it looks like this change didn't get carried over in the 3.0 merge.
I recommend we restore the fix from 1582 (partially) by moving register_shutdown_function above the SHORTINIT check.
This should only affect multisite installations (the only ones that use SHORTINIT), but should fix the problem
Change History (27)
- Cc westi added
- Keywords has-path reporter-feedback added; multisite has-patch dev-feedback removed
comment:11 jtclarke — 3 years ago
comment:19 ryan — 3 years ago
- Keywords 3.3-early added; dev-feedback 2nd-opinion removed
- Milestone changed from Awaiting Review to Future Release