#16362 closed defect (bug) (fixed)
wp_update_themes spawns HTTP request on every themes.php/update.php pageload
Reported by: | 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)
Change History (3)
Note: See
TracTickets for help on using
tickets.
(In [17618]) Prevent update API requests on every load of themes.php when no updates are available. Fixes #16362