Make WordPress Core


Ignore:
Timestamp:
02/07/2023 01:26:46 PM (8 months ago)
Author:
SergeyBiryukov
Message:

General: Check that set_time_limit() function is available before using it in core.

This avoids a fatal error if the function is disabled on certain environments.

Props theode, jokerrs, johnbillion, hellofromTonya, costdev, jrf, azaozz, SergeyBiryukov.
Fixes #55711.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/file.php

    r55226 r55258  
    541541
    542542        // Make sure PHP process doesn't die before loopback requests complete.
    543         set_time_limit( 5 * MINUTE_IN_SECONDS );
     543        if ( function_exists( 'set_time_limit' ) ) {
     544            set_time_limit( 5 * MINUTE_IN_SECONDS );
     545        }
    544546
    545547        // Time to wait for loopback requests to finish.
Note: See TracChangeset for help on using the changeset viewer.