After a fresh install of Genesis, and choosing it, viewing any page displays only the following message:

Fatal error: Call to undefined function: ctype_lower() in /usr/local/www/cgi-bin/drupal-6.13/themes/genesis/genesis/template.php on line 346

Comments

Jeff Burnz’s picture

Category: bug » feature
Priority: Critical » Normal
Status: Active » Closed (won't fix)

Upgrade your PHP my friend, it must be positively ancient. ctype_lower has been in PHP since 4.0.4 (Released: 19 December 2000)
http://www.php.net/manual/en/function.ctype-lower.php

gizmolab’s picture

actually, i have version 4.4.2 of php, but I take your point and will upgrade to latest (5.3.0) and hope nothing breaks :-)

Jeff Burnz’s picture

Ok, let me know how it goes, we can work around it otherwise.

gizmolab’s picture

i upgraded my php to version 5.2.10 using portinstall (FreeBSD v 6) and restarted my server. unfortunately, i still get the error about ctype-lower

i'm interested in your suggestions for a workaround

Jeff Burnz’s picture

You can switch to using is_numeric.

Around line 340, template.php (in Genesis core), replace the safe_string function code with this:

function safe_string($string) {
$string = strtolower(preg_replace('/[^a-zA-Z0-9-]+/', '-', $string));
  if (is_numeric($string{0})) {
    $string = 'id'. $string;
  }
  return $string;
}