Make WordPress Core


Ignore:
Timestamp:
02/07/2023 01:26:46 PM (22 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/class-wp-upgrader.php

    r55229 r55258  
    472472        $clear_destination = $args['clear_destination'];
    473473
    474         set_time_limit( 300 );
     474        if ( function_exists( 'set_time_limit' ) ) {
     475            set_time_limit( 300 );
     476        }
    475477
    476478        if ( empty( $source ) || empty( $destination ) ) {
Note: See TracChangeset for help on using the changeset viewer.