Changeset 6469

Show
Ignore:
Timestamp:
12/22/07 17:45:30 (9 months ago)
Author:
ryan
Message:

Show DB errors if WP_DEBUG and if installing. see #5473

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-admin/install.php

    r6426 r6469  
    6767        break; 
    6868    case 2: 
    69       if ( !empty($wpdb->error) ) 
    70         wp_die($wpdb->error->get_error_message()); 
    71     display_header();    
     69        if ( !empty($wpdb->error) ) 
     70            wp_die($wpdb->error->get_error_message()); 
     71 
     72        display_header();    
    7273        // Fill in the data we gathered 
    7374        $weblog_title = stripslashes($_POST['weblog_title']); 
     
    8384        } 
    8485 
    85     $result = wp_install($weblog_title, 'admin', $admin_email, $public); 
    86     extract($result, EXTR_SKIP); 
     86        $wpdb->show_errors(); 
     87        $result = wp_install($weblog_title, 'admin', $admin_email, $public); 
     88        extract($result, EXTR_SKIP); 
    8789?> 
    8890 
  • trunk/wp-includes/wp-db.php

    r6464 r6469  
    5555    function __construct($dbuser, $dbpassword, $dbname, $dbhost) { 
    5656        register_shutdown_function(array(&$this, "__destruct")); 
     57 
     58        if ( defined('WP_DEBUG') and WP_DEBUG == true ) 
     59            $this->show_errors(); 
    5760 
    5861        if ( defined('DB_CHARSET') )