Make WordPress Core

Changeset 59288


Ignore:
Timestamp:
10/24/2024 11:58:02 PM (4 months ago)
Author:
SergeyBiryukov
Message:

Revisions: Set PHP time limit when generating revision diffs vis Ajax.

This aims to avoid hanging PHP processes if a plugin inadvertently attempts to request a large number of revision diffs.

Follow-up to [24520], [24707], [59039].

Props madpeter, lovesoni1999, debarghyabanerjee, pbearne, desrosj, SergeyBiryukov.
Fixes #49291.

File:
1 edited

Legend:

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

    r59039 r59288  
    35573557    $return = array();
    35583558
    3559     // Removes the script timeout limit by setting it to 0 allowing ample time for diff UI setup.
    35603559    if ( function_exists( 'set_time_limit' ) ) {
    3561         set_time_limit( 0 );
     3560        // Increase the script timeout limit to allow ample time for diff UI setup.
     3561        set_time_limit( 5 * MINUTE_IN_SECONDS );
    35623562    }
    35633563
Note: See TracChangeset for help on using the changeset viewer.