Fix E_STRICT notice in wp_get_popular_importers(). see #24356.

git-svn-id: http://core.svn.wordpress.org/trunk@24378 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2013-05-28 03:53:59 +00:00
parent 4b13a1ffa4
commit b13b659365
1 changed files with 2 additions and 1 deletions

View File

@ -110,7 +110,8 @@ function wp_get_popular_importers() {
if ( ! $popular_importers ) {
$url = add_query_arg( 'locale', get_locale(), 'http://api.wordpress.org/core/importers/1.0/' );
$options = array( 'user-agent' => 'WordPress/' . $wp_version . '; ' . home_url() );
$popular_importers = maybe_unserialize( wp_remote_retrieve_body( wp_remote_get( $url, $options ) ) );
$response = wp_remote_get( $url, $options );
$popular_importers = maybe_unserialize( wp_remote_retrieve_body( $response ) );
if ( is_array( $popular_importers ) )
set_site_transient( 'popular_importers_' . $locale, $popular_importers, 2 * DAY_IN_SECONDS );