Fix potential notice in wp_handle_sideload().

git-svn-id: https://develop.svn.wordpress.org/trunk@13825 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2010-03-26 17:42:34 +00:00
parent 3d69d47f63
commit 2f67d59255
1 changed files with 1 additions and 1 deletions

View File

@ -392,7 +392,7 @@ function wp_handle_sideload( &$file, $overrides = false ) {
return $upload_error_handler( $file, __( 'Invalid form submission.' ));
// A successful upload will pass this test. It makes no sense to override this one.
if ( $file['error'] > 0 )
if ( ! empty( $file['error'] ) )
return $upload_error_handler( $file, $upload_error_strings[$file['error']] );
// A non-empty file will pass this test.