WordPress.org

Make WordPress Core

Opened 8 years ago

Closed 7 years ago

#5481 closed defect (bug) (fixed)

Use is_numeric instead of ctype_digit in wp-admin/includes/image.php

Reported by: josephscott Owned by:
Milestone: 2.5 Priority: normal
Severity: normal Version: 2.5
Component: Administration Keywords: has-patch
Focuses: Cc:

Description

The use of ctype_digit() has brought in as part of r6309 in wp-admin/includes/image.php. This will sound odd, but I've run into PHP installs that don't have ctype_* functions available. Seems like the next best thing is to use is_numeric().

Attachments (1)

image.php.diff (1.1 KB) - added by josephscott 8 years ago.

Download all attachments as: .zip

Change History (3)

@josephscott8 years ago

comment:1 @josephscott8 years ago

use of the WordPress function absint() would be even better than is_numeric().

comment:2 @ryan7 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [7549]) Use is_numeric instead of ctype_digit. Props josephscott. fixes #5481

Note: See TracTickets for help on using tickets.