WordPress.org

Plugin Directory

Changeset 504381 for wordpress-importer


Ignore:
Timestamp:
02/13/12 16:47:00 (2 years ago)
Author:
duck_
Message:

Double check that the export file has been uploaded correctly.

In WordPress 3.3 and 3.3.1 it is possible for wp_handle_upload() failure caused
by bad permissions on the upload directory to be report incorrectly. Instead of
an appropriate error message the user is told that they uploaded an invalid WXR
file with a missing or incorrect WXR version number. See #WP19800, #WP19720.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wordpress-importer/trunk/wordpress-importer.php

    r501867 r504381  
    194194            echo '<p><strong>' . __( 'Sorry, there has been an error.', 'wordpress-importer' ) . '</strong><br />'; 
    195195            echo esc_html( $file['error'] ) . '</p>'; 
     196            return false; 
     197        } else if ( ! file_exists( $file['file'] ) ) { 
     198            echo '<p><strong>' . __( 'Sorry, there has been an error.', 'wordpress-importer' ) . '</strong><br />'; 
     199            printf( __( 'The export file could not be found at <code>%s</code>. It is likely that this was caused by a permissions problem.' ), esc_html( $file['file'] ) ); 
     200            echo '</p>'; 
    196201            return false; 
    197202        } 
Note: See TracChangeset for help on using the changeset viewer.