[wp-trac] [WordPress Trac] #15568: Fatal Error in taxonomy.php

WordPress Trac wp-trac at lists.automattic.com
Thu Nov 25 01:27:16 UTC 2010


#15568: Fatal Error in taxonomy.php
--------------------------+-------------------------------------------------
 Reporter:  miqrogroove   |        Owner:          
     Type:  defect (bug)  |       Status:  reopened
 Priority:  normal        |    Milestone:          
Component:  Taxonomy      |      Version:  3.0.1   
 Severity:  normal        |   Resolution:          
 Keywords:                |  
--------------------------+-------------------------------------------------

Comment(by hakre):

 It's not only that this would be $wp_rewrite. There are some other globals
 that are used unchecked in functions. In those funcs, on invoke before
 those vars set, this just gives you fatal errors for those used as objects
 with function calls.

 I tend to say this is by design (no that I like that).

 Probably the functions using the global variable should be defined after
 the variable is set. But this won't change much for your report, you would
 get a fatal error then on the register_taxonomy function call.

 The only Idea I can share to deal with this is to use a mock-object that
 get's instantiated as the problematic global variables at the very
 beginning. Per magic methods, they catch all calls and are giving E_USER
 warnings for logging purposes. The globals are overwritten later, and for
 some you need to hack core to have this properly working.

 Sure, this is nothing for stable, I use it - if at all - for debugging and
 development purposes.

 Similar issues btw. can happen on shutdown of the application, but not
 that easy to cure.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/15568#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list