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:
azaozz 2009-12-26 08:49:32 +00:00
parent d9d8ddf4c8
commit a313be2e75
1 changed files with 1 additions and 1 deletions

View File

@ -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']