Changeset 7549

Show
Ignore:
Timestamp:
03/27/08 16:56:56 (5 months ago)
Author:
ryan
Message:

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

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • 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