Make WordPress Core

Ticket #36628: 36628.patch

File 36628.patch, 760 bytes (added by SergeyBiryukov, 8 years ago)
  • src/wp-admin/includes/upgrade.php

     
    317317                 */
    318318                $wp_rewrite->flush_rules( true );
    319319
    320                 // Test against a real WordPress Post, or if none were created, a random 404 page.
    321                 $test_url = get_permalink( 1 );
     320                $test_url = '';
    322321
    323                 if ( ! $test_url ) {
    324                         $test_url = home_url( '/wordpress-check-for-rewrites/' );
     322                // Test against a real WordPress Post
     323                $first_post = get_page_by_path( sanitize_title( _x( 'hello-world', 'Default post slug' ) ), OBJECT, 'post' );
     324                if ( $first_post ) {
     325                        $test_url = get_permalink( $first_post->ID );
    325326                }
    326327
    327328                /*