Make WordPress Core

Opened 12 years ago

Last modified 5 years ago

#21521 new enhancement

Audit use of set_time_limit()

Reported by: ryan's profile ryan Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.4.1
Component: Bootstrap/Load Keywords: needs-patch dev-feedback
Focuses: Cc:

Description

Core calls this half a dozen times. The call in wp_get_http() interferes with unit tests. Unit tests will terminate 60 seconds after wp_get_http() is called. Let's justify each use of set_time_limit() and remove what we can.

Change History (9)

#2 @kurtpayne
12 years ago

  • Cc kpayne@… added

#3 @kurtpayne
12 years ago

wp-admin/includes/class-wp-upgrader.php line @ line 174

@set_time_limit( 300 );

Changeset [11005] and ticket #7875


wp-admin/includes/update-core.php @ line 517

@set_time_limit( 300 );

Changeset [9164] and ticket #5560


wp-admin/network/sites.php @ line 97

wp-admin/network/sites.php @ line 103

set_time_limit( 60 );

This was traced back to the import of ms-edit.php in changeset [12603]
One of these came from the mu trac in changeset 860.

The second one was expanded upon in changeset 1237.


wp-includes/class-pop3.php @ line 60

set_time_limit($timeout);

wp-includes/class-pop3.php @ line 67

set_time_limit($timeout);

These are in a 3rd party library


wp-includes/comment @ line 1817

@ set_time_limit( 60 );

It came originally from comment-functions.php and I lost the trail there


wp-includes/functions.php @ line 492

@set_time_limit( 60 );

Original changeset [2416]

#4 @SergeyBiryukov
12 years ago

The first two instances from comment:3 were both introduced in [9164]. The one from wp_update_core() was moved to WP_Upgrader.

The last two instances were both introduced in [1812].

The one from do_enclose() was moved to wp_get_http_headers() and after [6390] ended up in wp_get_http().

The one from pingback() is still there.

Last edited 12 years ago by SergeyBiryukov (previous) (diff)

#6 @ryan
11 years ago

In [22259]:

Remove set_time_limit() from sites.php. Props dllh. fixes #19486 see #21521

#7 @ryan
11 years ago

  • Milestone changed from 3.5 to Future Release
  • Type changed from defect (bug) to enhancement

#8 @nacin
10 years ago

  • Component changed from General to Bootstrap/Load

#9 @chriscct7
8 years ago

  • Keywords needs-patch dev-feedback added

What is left to be done?

Note: See TracTickets for help on using tickets.