[wp-trac] [WordPress Trac] #15881: wp_cache_get generates fatal error

WordPress Trac wp-trac at lists.automattic.com
Wed Dec 29 23:38:09 UTC 2010


#15881: wp_cache_get generates fatal error
-------------------------------------------------+-------------------------
 Reporter:  pixelgeek                            |       Owner:
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  Awaiting
Component:  Cache                                |  Review
 Severity:  critical                             |     Version:  3.0.3
 Keywords:  $wp_object_cache, wp_cache_get       |  Resolution:
  cache.php                                      |
-------------------------------------------------+-------------------------

Comment (by tomarq):

 PHP 5.3.2

 (previous comment mentioned wp-load lines 73 and 79, but that was in
 error, it's wp-settings lines 73 and 79)

 I've tried moving wp_start_object_cache(); to before require_wp_db(); and
 the original error is solved, but I get SQL errors because get_option
 doesn't yet have table names/prefixes.  Moving wp_set_wpdb_vars(); up to
 get prefixes obviously fails because require_wp_db hasn't been called yet.
 So, it's a catch 22 (at least as compares to how WP previously worked).

 I can see how very few plugins use db.php to get started early (caches and
 things like hive) but, a hook after the database is set up, before WP
 really gets going, could be useful.  Something in wp-setting.php around
 about line 94:
 // Stop most of WordPress from being loaded if we just want the basics.
 if ( SHORTINIT )
         return false;

 seems like a good spot.

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


More information about the wp-trac mailing list