diff --git a/wp-admin/includes/ajax-actions.php b/wp-admin/includes/ajax-actions.php index a4e4e810df..9b03c403e2 100644 --- a/wp-admin/includes/ajax-actions.php +++ b/wp-admin/includes/ajax-actions.php @@ -3528,7 +3528,10 @@ function wp_ajax_get_revision_diffs() { } $return = array(); - set_time_limit( 0 ); + + if ( function_exists( 'set_time_limit' ) ) { + set_time_limit( 0 ); + } foreach ( $_REQUEST['compare'] as $compare_key ) { list( $compare_from, $compare_to ) = explode( ':', $compare_key ); // from:to diff --git a/wp-admin/includes/class-wp-upgrader.php b/wp-admin/includes/class-wp-upgrader.php index 1b2df949cf..f6653af742 100644 --- a/wp-admin/includes/class-wp-upgrader.php +++ b/wp-admin/includes/class-wp-upgrader.php @@ -471,7 +471,9 @@ class WP_Upgrader { $destination = $args['destination']; $clear_destination = $args['clear_destination']; - set_time_limit( 300 ); + if ( function_exists( 'set_time_limit' ) ) { + set_time_limit( 300 ); + } if ( empty( $source ) || empty( $destination ) ) { return new WP_Error( 'bad_request', $this->strings['bad_request'] ); diff --git a/wp-admin/includes/file.php b/wp-admin/includes/file.php index cc0c0a8af2..e3c1849cc9 100644 --- a/wp-admin/includes/file.php +++ b/wp-admin/includes/file.php @@ -540,7 +540,9 @@ function wp_edit_theme_plugin_file( $args ) { } // Make sure PHP process doesn't die before loopback requests complete. - set_time_limit( 5 * MINUTE_IN_SECONDS ); + if ( function_exists( 'set_time_limit' ) ) { + set_time_limit( 5 * MINUTE_IN_SECONDS ); + } // Time to wait for loopback requests to finish. $timeout = 100; // 100 seconds. diff --git a/wp-admin/includes/update-core.php b/wp-admin/includes/update-core.php index 005d70cbf6..ac305ada4a 100644 --- a/wp-admin/includes/update-core.php +++ b/wp-admin/includes/update-core.php @@ -1053,7 +1053,9 @@ $_new_bundled_files = array( function update_core( $from, $to ) { global $wp_filesystem, $_old_files, $_old_requests_files, $_new_bundled_files, $wpdb; - set_time_limit( 300 ); + if ( function_exists( 'set_time_limit' ) ) { + set_time_limit( 300 ); + } /* * Merge the old Requests files and directories into the `$_old_files`. diff --git a/wp-includes/comment.php b/wp-includes/comment.php index 53c6b5df2d..e3d869e9f6 100644 --- a/wp-includes/comment.php +++ b/wp-includes/comment.php @@ -3111,7 +3111,10 @@ function pingback( $content, $post ) { $pingback_server_url = discover_pingback_server_uri( $pagelinkedto ); if ( $pingback_server_url ) { - set_time_limit( 60 ); + if ( function_exists( 'set_time_limit' ) ) { + set_time_limit( 60 ); + } + // Now, the RPC call. $pagelinkedfrom = get_permalink( $post ); diff --git a/wp-includes/deprecated.php b/wp-includes/deprecated.php index 3787d71297..280083114c 100644 --- a/wp-includes/deprecated.php +++ b/wp-includes/deprecated.php @@ -3659,7 +3659,9 @@ function post_permalink( $post = 0 ) { function wp_get_http( $url, $file_path = false, $red = 1 ) { _deprecated_function( __FUNCTION__, '4.4.0', 'WP_Http' ); - @set_time_limit( 60 ); + if ( function_exists( 'set_time_limit' ) ) { + @set_time_limit( 60 ); + } if ( $red > 5 ) return false; diff --git a/wp-includes/version.php b/wp-includes/version.php index 56f7df0e15..5aeb52b434 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.2-alpha-55257'; +$wp_version = '6.2-alpha-55258'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.