Make WordPress Core

Ticket #43358: 43358.diff

File 43358.diff, 716 bytes (added by SergeyBiryukov, 5 years ago)
  • src/wp-admin/includes/file.php

     
    550550                } else {
    551551                        $url = admin_url();
    552552                }
     553
     554                if ( PHP_SESSION_ACTIVE === session_status() ) {
     555                        // Close any active session to prevent cURL from timing out
     556                        // when attempting to connect back to the site.
     557                        session_write_close();
     558                }
     559
    553560                $url                    = add_query_arg( $scrape_params, $url );
    554561                $r                      = wp_remote_get( $url, compact( 'cookies', 'headers', 'timeout', 'sslverify' ) );
    555562                $body                   = wp_remote_retrieve_body( $r );