Make WordPress Core

Ticket #25572: 25572.3.diff

File 25572.3.diff, 807 bytes (added by nacin, 12 years ago)
  • src/wp-admin/includes/class-wp-upgrader.php

     
    15041504
    15051505                $check_dirs = array_unique( $check_dirs );
    15061506
     1507                $checkout = false;
    15071508                // Search all directories we've found for evidence of version control.
    1508                 foreach ( $vcs_dirs as $vcs_dir ) {
    1509                         foreach ( $check_dirs as $check_dir ) {
    1510                                 if ( $checkout = is_dir( rtrim( $check_dir, '\\/' ) . "/$vcs_dir" ) )
     1509                foreach ( $check_dirs as $check_dir ) {
     1510                        if ( ! @is_dir( $check_dir ) )
     1511                                break;
     1512                        foreach ( $vcs_dirs as $vcs_dir ) {
     1513                                if ( $checkout = @is_dir( rtrim( $check_dir, '\\/' ) . "/$vcs_dir" ) )
    15111514                                        break 2;
    15121515                        }
    15131516                }