Make WordPress Core

Ticket #40694: b.diff

File b.diff, 682 bytes (added by andy, 8 years ago)
  • src/wp-admin/includes/upgrade.php

     
    22112211                }
    22122212
    22132213                // Fetch the table column structure from the database
    2214                 $suppress = $wpdb->suppress_errors();
    2215                 $tablefields = $wpdb->get_results("DESCRIBE {$table};");
    2216                 $wpdb->suppress_errors( $suppress );
     2214                $tablefields = false;
     2215                $table_exists = $wpdb->get_var( "SHOW TABLES LIKE '$table'" );
     2216                if ( $table_exists === $table ) {
     2217                        $tablefields = $wpdb->get_results( "DESCRIBE {$table};" );
     2218                }
    22172219
    22182220                if ( ! $tablefields )
    22192221                        continue;