mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 09:07:59 +01:00
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. Built from https://develop.svn.wordpress.org/trunk@59288 git-svn-id: http://core.svn.wordpress.org/trunk@58680 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
269aa32b13
commit
11dfb2d162
@ -3556,9 +3556,9 @@ function wp_ajax_get_revision_diffs() {
|
||||
|
||||
$return = array();
|
||||
|
||||
// Removes the script timeout limit by setting it to 0 allowing ample time for diff UI setup.
|
||||
if ( function_exists( 'set_time_limit' ) ) {
|
||||
set_time_limit( 0 );
|
||||
// Increase the script timeout limit to allow ample time for diff UI setup.
|
||||
set_time_limit( 5 * MINUTE_IN_SECONDS );
|
||||
}
|
||||
|
||||
foreach ( $_REQUEST['compare'] as $compare_key ) {
|
||||
|
@ -16,7 +16,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.8-alpha-59287';
|
||||
$wp_version = '6.8-alpha-59288';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user