[wp-trac] Re: [WordPress Trac] #3471: Fatal error messages are
cached by proxy servers
WordPress Trac
wp-trac at lists.automattic.com
Thu Sep 13 02:55:48 GMT 2007
#3471: Fatal error messages are cached by proxy servers
-----------------------+----------------------------------------------------
Reporter: justdave | Owner: anonymous
Type: defect | Status: new
Priority: normal | Milestone: 2.3
Component: General | Version: 2.1
Severity: normal | Resolution:
Keywords: has-patch |
-----------------------+----------------------------------------------------
Comment (by DD32):
> If we do this the patch should use status_header()
Thats fine for in wp-includes/functions.php, however if the database is
down, then the databse error is triggered before its included.
I've attached a new patch, It removes the html from wp-db.php, and calls
wp_die instead, wp_die uses status_header().
I had to do a bit more hacking to make it work correctly, have a look at
the diff for more info.
status_header() is defined in functions.php, so to use that for the
database error, functions.php needed to be included first, Once doing
that, i realised that the code was now duplicated in wp-db and wp_die, So
i've got the datbase to just use wp_die(), and added a few extra checks in
wp_die() to see if functions exist.
Also, If this gets slated for 2.4 rather than 2.3, the CSS location in
wpdb->bail() points to the wrong location, so if this gets knocked back,
that'll need fixing.
--
Ticket URL: <http://trac.wordpress.org/ticket/3471#comment:7>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list