Plugin Directory

Opened 7 months ago

#2644 new defect

Wordpress Importer doesn't support latest Wordpress: wp_get_http

Reported by: abdessamad idrissi Owned by:
Priority: highest Severity: normal
Plugin: not-listed Keywords: wordpress importer


Wordpress Importer expects wp_get_http to return a specific headers format but the latest one returns different output in wordpress-importer/wordpress-importer.php:991:

// fetch the remote url and write it to the placeholder file
$headers = wp_get_http( $url, $upload['file'] );

This prevents importing attachements and outputs a WP_Erro in 1007:

if ( isset( $headers['content-length'] ) && $filesize != $headers['content-length'] ) {
  @unlink( $upload['file'] );
  return new WP_Error( 'import_file_error', __('Remote file is incorrect size', 'wordpress-importer') );

We should check/call headers using $headers['data']['content-length'] instead.

Change History (0)

Note: See TracTickets for help on using tickets.