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.