Make WordPress Core

Changeset 59039


Ignore:
Timestamp:
09/17/2024 10:39:58 PM (4 weeks ago)
Author:
jorbin
Message:

Bootstrap/Load: Ensure uses of set_time_limit are documented why.

set_time_limit can cause unexpected behavior so it general should be avoided. There are instances though where they should be used so those instances should be properly documented.

Props Rcrayno, ryan, kurtpayne, jorbin.
Fixes #21521. See #19487.

Location:
trunk/src
Files:
6 edited

Legend:

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

    r58416 r59039  
    35573557    $return = array();
    35583558
     3559    // Removes the script timeout limit by setting it to 0 allowing ample time for diff UI setup.
    35593560    if ( function_exists( 'set_time_limit' ) ) {
    35603561        set_time_limit( 0 );
  • trunk/src/wp-admin/includes/class-wp-upgrader.php

    r58975 r59039  
    525525        $clear_destination = $args['clear_destination'];
    526526
     527        // Give the upgrade an additional 300 seconds(5 minutes) to ensure the install doesn't prematurely timeout having used up the maximum script execution time upacking and downloading in WP_Upgrader->run.
    527528        if ( function_exists( 'set_time_limit' ) ) {
    528529            set_time_limit( 300 );
  • trunk/src/wp-admin/includes/update-core.php

    r58975 r59039  
    963963
    964964    if ( function_exists( 'set_time_limit' ) ) {
     965        // Gives core update script time an additional 300 seconds(5 minutes) to finish updating large files or run on slower servers.
    965966        set_time_limit( 300 );
    966967    }
  • trunk/src/wp-includes/class-pop3.php

    r55305 r59039  
    6161            $this->TIMEOUT = $timeout;
    6262            if(function_exists("set_time_limit")){
     63                // Extends POP3 request timeout to specified TIMEOUT property.
    6364                set_time_limit($timeout);
    6465            }
     
    7677    function update_timer () {
    7778        if(function_exists("set_time_limit")){
     79            // Allows additional extension of POP3 request timeout to specified TIMEOUT property when update_timer is called.
    7880            set_time_limit($this->TIMEOUT);
    7981        }
  • trunk/src/wp-includes/comment.php

    r58962 r59039  
    31173117        if ( $pingback_server_url ) {
    31183118            if ( function_exists( 'set_time_limit' ) ) {
     3119                // Allows an additional 60 seconds for each pingback to complete.
    31193120                set_time_limit( 60 );
    31203121            }
  • trunk/src/wp-includes/deprecated.php

    r58975 r59039  
    36743674    _deprecated_function( __FUNCTION__, '4.4.0', 'WP_Http' );
    36753675
     3676    // Adds an additional 60 seconds to the script timeout to ensure the remote request has enough time.
    36763677    if ( function_exists( 'set_time_limit' ) ) {
    36773678        @set_time_limit( 60 );
Note: See TracChangeset for help on using the changeset viewer.