[wp-trac] [WordPress Trac] #16362: wp_update_themes spawns HTTP request on every themes.php/update.php pageload

WordPress Trac wp-trac at lists.automattic.com
Mon Jan 24 10:08:20 UTC 2011


#16362: wp_update_themes spawns HTTP request on every themes.php/update.php
pageload
--------------------------+---------------------------------
 Reporter:  dd32          |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Future Release
Component:  Performance   |    Version:  3.1
 Severity:  normal        |   Keywords:  has-patch 3.2-early
--------------------------+---------------------------------
 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.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/16362>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list