Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code issues with set_time_limit #7638

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/wp-admin/includes/ajax-actions.php
Original file line number Diff line number Diff line change
Expand Up @@ -3558,7 +3558,7 @@ function wp_ajax_get_revision_diffs() {

// Removes the script timeout limit by setting it to 0 allowing ample time for diff UI setup.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Removes the script timeout limit by setting it to 0 allowing ample time for diff UI setup.

I think it's better to remove the comment if we are passing a positive value to set_time_limit()

if ( function_exists( 'set_time_limit' ) ) {
set_time_limit( 0 );
set_time_limit( 120 );
}

foreach ( $_REQUEST['compare'] as $compare_key ) {
Expand Down
2 changes: 1 addition & 1 deletion src/wp-includes/class-pop3.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class POP3 {
/**
* PHP5 constructor.
*/
function __construct ( $server = '', $timeout = '' ) {
function __construct ( $server = '', $timeout = 120 ) {
settype($this->BUFFER,"integer");
if( !empty($server) ) {
// Do not allow programs to alter MAILSERVER
Expand Down
Loading