Make WordPress Core

Ticket #39459: 39459.2.diff

File 39459.2.diff, 794 bytes (added by Hareesh Pillai, 4 years ago)

Patch refreshed against trunk

  • src/wp-admin/admin.php

     
    3535
    3636nocache_headers();
    3737
    38 if ( get_option( 'db_upgraded' ) ) {
     38if ( ! wp_doing_ajax() && get_option( 'db_upgraded' ) ) {
    3939
    4040        flush_rewrite_rules();
    4141        update_option( 'db_upgraded', false );
     
    4747         */
    4848        do_action( 'after_db_upgrade' );
    4949
    50 } elseif ( (int) get_option( 'db_version' ) !== $wp_db_version && empty( $_POST ) ) {
     50} elseif ( ! wp_doing_ajax() && (int) get_option( 'db_version' ) !== $wp_db_version && empty( $_POST ) ) {
    5151
    5252        if ( ! is_multisite() ) {
    5353                wp_redirect( admin_url( 'upgrade.php?_wp_http_referer=' . urlencode( wp_unslash( $_SERVER['REQUEST_URI'] ) ) ) );