Make WordPress Core


Ignore:
Timestamp:
03/27/2008 04:56:56 PM (17 years ago)
Author:
ryan
Message:

Use is_numeric instead of ctype_digit. Props josephscott. fixes #5481

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/image.php

    r7135 r7549  
    4141 */
    4242function wp_crop_image( $src_file, $src_x, $src_y, $src_w, $src_h, $dst_w, $dst_h, $src_abs = false, $dst_file = false ) {
    43     if ( ctype_digit( $src_file ) ) // Handle int as attachment ID
     43    if ( is_numeric( $src_file ) ) // Handle int as attachment ID
    4444        $src_file = get_attached_file( $src_file );
    4545
     
    125125 */
    126126function wp_load_image( $file ) {
    127     if ( ctype_digit( $file ) )
     127    if ( is_numeric( $file ) )
    128128        $file = get_attached_file( $file );
    129129
Note: See TracChangeset for help on using the changeset viewer.