Replace ctype_digit() with is_numeric() for better compatibility, props markup, fixes #11620 for trunk

git-svn-id: https://develop.svn.wordpress.org/trunk@12544 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2009-12-26 08:47:47 +00:00
parent d94f8b9331
commit c3f5b583bc
1 changed files with 1 additions and 1 deletions

View File

@ -239,7 +239,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']