[wp-trac] [WordPress Trac] #16389: register_shutdown_function isn't run in SHORTINIT mode

WordPress Trac wp-trac at lists.automattic.com
Thu Jan 27 15:53:27 UTC 2011


#16389: register_shutdown_function isn't run in SHORTINIT mode
-------------------------+-------------------------------------------------
 Reporter:  jtclarke     |      Owner:
     Type:  defect       |     Status:  new
  (bug)                  |  Milestone:  Awaiting Review
 Priority:  normal       |    Version:  3.0.4
Component:  General      |   Keywords:  SHORTINIT,
 Severity:  normal       |  register_shutdown_function, multisite
-------------------------+-------------------------------------------------
 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

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/16389>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list