Make WordPress Core

Changeset 7405


Ignore:
Timestamp:
03/19/2008 11:17:23 PM (19 years ago)
Author:
ryan
Message:

Suppress errors during option retrieval while installing. see #5771

File:
1 edited

Legend:

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

    r7395 r7405  
    217217                if ( false === $value ) {
    218218                        if ( defined( 'WP_INSTALLING' ) )
    219                                 $show = $wpdb->hide_errors();
     219                                $supress = $wpdb->suppress_errors();
    220220                        // expected_slashed ($setting)
    221221                        $row = $wpdb->get_row( "SELECT option_value FROM $wpdb->options WHERE option_name = '$setting' LIMIT 1" );
    222222                        if ( defined( 'WP_INSTALLING' ) )
    223                                 $wpdb->show_errors($show);
     223                                $wpdb->suppress_errors($suppress);
    224224
    225225                        if ( is_object( $row) ) { // Has to be get_row instead of get_var because of funkiness with 0, false, null values
    … …  
    280280
    281281        if ( !$alloptions ) {
    282                 $show = $wpdb->hide_errors();
     282                $suppress = $wpdb->suppress_errors();
    283283                if ( !$alloptions_db = $wpdb->get_results( "SELECT option_name, option_value FROM $wpdb->options WHERE autoload = 'yes'" ) )
    284284                        $alloptions_db = $wpdb->get_results( "SELECT option_name, option_value FROM $wpdb->options" );
    285                 $wpdb->show_errors($show);
     285                $wpdb->suppress_errors($suppress);
    286286                $alloptions = array();
    287287                foreach ( (array) $alloptions_db as $o )
Note: See TracChangeset for help on using the changeset viewer.