[wp-trac] [WordPress Trac] #11620: Upload Handling. Use is_numeric instead of ctype_digit.
WordPress Trac
wp-trac at lists.automattic.com
Fri Dec 25 19:27:55 UTC 2009
#11620: Upload Handling. Use is_numeric instead of ctype_digit.
-------------------------+--------------------------------------------------
Reporter: markup | Owner:
Type: enhancement | Status: new
Priority: high | Milestone: 3.0
Component: Upload | Version: 2.9
Severity: normal | Keywords: has-patch
-------------------------+--------------------------------------------------
Changes (by markup):
* cc: eval@… (added)
Comment:
Replying to [comment:1 scribu]:
> Could you give a reason why you want this change to be made?
is_numeric() is a standard function for php version 4 and 5, while
ctype_digit() is avaliable only in the "ctype" extension, which may have
no support at all. In WordPress they refused ctype starting from the
version 2.5.1, see for reference
http://core.trac.wordpress.org/search?q=ctype_digit
And now if the "ctype" extension is missing on the server, a WP user can't
upload media in wordPress through the administration panel. Perhaps you
should add this enhancement to 2.9.1 or 2.9.2 milestone.
For those user, that already have the same problem, I propose use the
following snippet in the template functions.php
{{{
if(!finction_exists('ctype_digit')) {
function ctype_digit( $num ) { return is_numeric( $num ); }
}
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/11620#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list