From ba90d16134fd9d1aa4895d4e0ec51d0d79f77aba Mon Sep 17 00:00:00 2001 From: ryan Date: Thu, 27 Mar 2008 16:56:56 +0000 Subject: [PATCH] Use is_numeric instead of ctype_digit. Props josephscott. fixes #5481 git-svn-id: http://svn.automattic.com/wordpress/trunk@7549 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/image.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-admin/includes/image.php b/wp-admin/includes/image.php index 1c2e36a484..2af026d7d4 100644 --- a/wp-admin/includes/image.php +++ b/wp-admin/includes/image.php @@ -40,7 +40,7 @@ function wp_create_thumbnail( $file, $max_side, $deprecated = '' ) { * */ function wp_crop_image( $src_file, $src_x, $src_y, $src_w, $src_h, $dst_w, $dst_h, $src_abs = false, $dst_file = false ) { - if ( ctype_digit( $src_file ) ) // Handle int as attachment ID + if ( is_numeric( $src_file ) ) // Handle int as attachment ID $src_file = get_attached_file( $src_file ); $src = wp_load_image( $src_file ); @@ -124,7 +124,7 @@ function wp_generate_attachment_metadata( $attachment_id, $file ) { * */ function wp_load_image( $file ) { - if ( ctype_digit( $file ) ) + if ( is_numeric( $file ) ) $file = get_attached_file( $file ); if ( ! file_exists( $file ) )