Replace ctype_digit() with is_numeric() for better compatibility, props markup, fixes #11620 for 2.9
git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@12545 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d9d8ddf4c8
commit
a313be2e75
|
@ -235,7 +235,7 @@ function wp_handle_upload( &$file, $overrides = false, $time = null ) {
|
|||
$upload_error_handler = 'wp_handle_upload_error';
|
||||
|
||||
// You may have had one or more 'wp_handle_upload_prefilter' functions error out the file. Handle that gracefully.
|
||||
if ( isset( $file['error'] ) && !ctype_digit( $file['error'] ) && $file['error'] )
|
||||
if ( isset( $file['error'] ) && !is_numeric( $file['error'] ) && $file['error'] )
|
||||
return $upload_error_handler( $file, $file['error'] );
|
||||
|
||||
// You may define your own function and pass the name in $overrides['unique_filename_callback']
|
||||
|
|
Loading…
Reference in New Issue