diff --git a/wp-admin/includes/file.php b/wp-admin/includes/file.php index edfdef5756..5b11a07f6d 100644 --- a/wp-admin/includes/file.php +++ b/wp-admin/includes/file.php @@ -550,6 +550,13 @@ function wp_edit_theme_plugin_file( $args ) { } else { $url = admin_url(); } + + if ( PHP_SESSION_ACTIVE === session_status() ) { + // Close any active session to prevent HTTP requests from timing out + // when attempting to connect back to the site. + session_write_close(); + } + $url = add_query_arg( $scrape_params, $url ); $r = wp_remote_get( $url, compact( 'cookies', 'headers', 'timeout', 'sslverify' ) ); $body = wp_remote_retrieve_body( $r ); diff --git a/wp-includes/version.php b/wp-includes/version.php index ca4c706779..5a483bbcbe 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.5-alpha-47456'; +$wp_version = '5.5-alpha-47457'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.