Call To Undefined Function: ctype_digit() in WordPress 2.5

After upgrading or installing WordPress 2.5, the following PHP error may appear on web pages or in Apache web server log, especially when using the new Flash based media uploader to upload photos, pictures, images, videos and other files:

[error] [client x.x.x.x] PHP Fatal Error: Call to undefined function: ctype_digit() in /wordpress/wp-includes/link-template.php on line 182, referer: /wp-admin/media-upload.php?type=image&tab=library&post_id=1&post_mime_type=&s=&m=200804


The function ctype_digit() is used in get_attachment_link() in link-template.php, and the error may happens on some PHP installation regardless of version. PHP 4 (such 4.3.10) and PHP 5 (such as 5.2.6) both may be affected with the error.

This is a known bug that will be fixed in WordPress 2.5.1, which may released in early May. Meanwhile, if you want to fix the issue immediately, download fixed link-template.php file, and then upload and replace/overwrite the same link-template.php file in /wp-includes/ folder on the web server.

If you’re using IE7, some bugs have to be fixed too before release of WordPress 2.5.1.



4 Responses to “Call To Undefined Function: ctype_digit() in WordPress 2.5”

  1. Jérôme Delacroix
    August 4th, 2008 15:04
    4

    Hi,

    Thank you for the tip ! It fixed my Flash uploader feature.

  2. WordPress 2.5.1 Released for Download » Tip and Trick
    July 16th, 2008 03:07
    3

    [...] upgrade to WordPress 2.5.1, which fixes many bugs related to new interface in WordPress 2.5 such as call to undefined function ctype_digit(), plus critial security fix. The features, bugs fixed and improvements in WordPress 2.5.1 [...]

  3. Disable WordPress 2.5 Flash Image/Video/Media Uploader with Plugin » Tip and Trick
    April 21st, 2008 22:35
    2

    [...] uploader does not work after whatever effort, workaround and solution been done, including some bug fixes, such as disable conflicting plugin and bypass mod_security to try to solve the error and issue, [...]

  4. Fix WordPress 2.5 Image or Media Flash Uploader Not Working Issue in IE7 » Tip and Trick
    April 21st, 2008 22:33
    1

    [...] bug is related to ctype_digit() function. If using the Flash uploader is too much trouble, disable the Flash media uploader with this [...]

Leave a Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Subscribe to comments feature has been disabled. To receive notification of latest comments posted, subscribe to Tip and Trick Comments RSS feed or register to receive new comments in daily email digest.
Custom Search

Incoming Search Terms for the Article

Call to undefined function ctype_digit() - Call to undefined function ctype_digit - Call to undefined function ctype_digit() - Call to undefined function: ctype_digit() - ctype_digit - Fatal error: Call to undefined function ctype_digit() - undefined function ctype_digit - ctype_digit undefined - "Call to undefined function wp()" - wordpress - php ctype_digit - Call to undefined function ctype_digit() in - PHP Fatal error: Call to undefined function ctype_digit() - "Call to undefined function ctype_digit()" - undefined function ctype_digit() - PHP Fatal error: Call to undefined function ctype_digit() - ctype_digit undefined function - Call to undefined function wp() - "Call to undefined function: ctype_digit()" - "wp-includes/link-template.php" undefined function ctype_digit() - php Call to undefined function ctype_digit() - Fatal error: Call to undefined function ctype_digit() in - Call to undefined function ctype_digit() - Fatal error: Call to undefined function: ctype_digit() - Call to undefined function ctype_digit() wordpress - wordpress "Call to undefined function ctype_digit()" - Fatal error: Call to undefined function get_currentuserinfo() - Call to undefined function get_currentuserinfo() - php ctype_digit() undefined - undefined php error - wordpress Call to undefined function - undefined function ctype_digit() - base Call to undefined function ctype_digit() - all to undefined function ctype_digit() - gallery Call to undefined function ctype_digit() - "Call to undefined function ctype_digit" - media-upload.php modsecurity - Fatal error: Call to undefined function wordpress - Call to undefined function ctype_digit( - "Call to undefined function ctype_digit() in" - Call to undefined function wp() in - demonoid invite code - April 22, 2008 - Wordpress 2.5 ctype_digit - wordpress Fatal error: Call to undefined function ctype_digit() in - ctype_digit() wordpress - 0xc0000034 BOOT VISTA SP1 SOLVE - wordpress 2.5 media-upload.php error - wordpress php 5.2.6 error - wordpress 2.5 non flash uploader - web+publishing -