Make WordPress Core

Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#16362 closed defect (bug) (fixed)

wp_update_themes spawns HTTP request on every themes.php/update.php pageload

Reported by: dd32's profile dd32 Owned by:
Milestone: 3.2 Priority: normal
Severity: normal Version: 3.1
Component: Performance Keywords: has-patch 3.2-early
Focuses: Cc:

Description

wp_update_themes is not handling caching the HTTP request correctly.

$theme_changed is always true, This is caused by the transient not including a 'checked' property.

This appears to be caused by this line: if ( $response ) {, When there are no theme updates, an empty array is returned from the API, PHP converts an empty array to a boolean false, In turn, the checked list is not cached correctly.

Attached patch corrects this, This exists within 3.1 however is likely to have been an issue for a few versions now.

Attachments (1)

16362.diff (462 bytes) - added by dd32 14 years ago.

Download all attachments as: .zip

Change History (3)

@dd32
14 years ago

#1 @dd32
14 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [17618]) Prevent update API requests on every load of themes.php when no updates are available. Fixes #16362

#2 @nacin
14 years ago

  • Milestone changed from Future Release to 3.2
Note: See TracTickets for help on using tickets.