Make WordPress Core

Ticket #48283: 48283.diff

File 48283.diff, 648 bytes (added by dlh, 5 years ago)
  • src/wp-cron.php

    diff --git src/wp-cron.php src/wp-cron.php
    index 1a944c216e..d3ab354eda 100644
    ignore_user_abort( true ); 
    2020
    2121/* Don't make the request block till we finish, if possible. */
    2222if ( function_exists( 'fastcgi_finish_request' ) && version_compare( phpversion(), '7.0.16', '>=' ) ) {
    23         header( 'Expires: Wed, 11 Jan 1984 05:00:00 GMT' );
    24         header( 'Cache-Control: no-cache, must-revalidate, max-age=0' );
     23        if ( ! headers_sent() ) {
     24                header( 'Expires: Wed, 11 Jan 1984 05:00:00 GMT' );
     25                header( 'Cache-Control: no-cache, must-revalidate, max-age=0' );
     26        }
     27
    2528        fastcgi_finish_request();
    2629}
    2730