Make WordPress Core


Ignore:
Timestamp:
09/13/2007 06:23:23 AM (19 years ago)
Author:
markjaquith
Message:

Use wp_die() for WPDB bails. Send 500 response and no-cache headers so wp_die()s are not cached. props DD32. fixes #3471

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions.php

    r6108 r6110  
    12411241                $admin_dir = 'wp-admin/';
    12421242
    1243         if ( !did_action('admin_head') ) :
     1243        if ( !function_exists('did_action') || !did_action('admin_head') ) :
     1244        status_header(500);
     1245        nocache_headers();
    12441246        header('Content-Type: text/html; charset=utf-8');
    12451247
    1246         if ( empty($title) )
    1247                 $title = __('WordPress › Error');
    1248 
    1249 
     1248        if ( empty($title) ){
     1249                if( function_exists('__') )
     1250                        $title = __('WordPress › Error');
     1251                else
     1252                        $title = 'WordPress › Error';
     1253        }
    12501254
    12511255?>
Note: See TracChangeset for help on using the changeset viewer.