When I tried to delete a comment yesterday, the resulting error was

Fatal error: Call to undefined function: ctype_digit() in /var/www/drupal.org/htdocs/modules/comment.module on line 881

Related to the recent modification to comment.module.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

AjK’s picture

The requirements page (http://drupal.org/requirements) says Drupal 4.6 and beyond need PHP 4.3.3+

The ctype_digit() functions are built-in by default from PHP 4.2+ so if it's unavailable to you, I guess you running a version of PHP older than 4.2 ?

I can roll a patch back to is_numeric() if people are going to be having problems like this?

What's the concensus on this?

best regards,
-AjK

Heine’s picture

This is about drupal.org :)

Dries’s picture

I wonder how that patch got committed. I asked not to use ctype_digit ... we'll have to fix core.

AjK’s picture

Status: Active » Needs review
FileSize
2.16 KB

change ctype_digit() to is_numeric() for DRUPAL-4-7

best regards,
--AjK

drumm’s picture

Status: Needs review » Needs work

ctype_digit() seemed like it was the right function, but enough distributions don't have it enabled by default for this to be a problem.

I think something line-wrapped the patch and it isn't working for me.

drumm’s picture

Pathauto uses a ctype function and is enabled on groups.drupal.org.

I've had to recompile PHP on Drupal.org previously for this (the main issue was with distributed logins not working due to XML not being compiled in) with chx's advice. At the time no OSL people could be found.

AjK’s picture

That's odd. The file isn't line wrapped on my unix machine but when you open it on Windows (via samba) it gets wrapped (must make a note of that)

Let's try again....

best regards,
--AjK

drumm’s picture

Status: Needs work » Active

Committed to HEAD.

Since this is an infrastructure issue, I'll leave this issue open.

There is the same problem with pathauto on groups.

killes@www.drop.org’s picture

Status: Active » Fixed

committed to 4.7 and updated drupal.org

Anonymous’s picture

Status: Fixed » Closed (fixed)