Fatal error: Call to undefined function lcfirst() in /home/randrand/greenhive.coop/commons/profiles/commons/modules/contrib/commons_site_homepage/commons_site_homepage.module on line 23

I get this when I click the link to view my new site after installation.
I am so excited to get this site working!



gnuget’s picture

Status:Active» Needs review
new797 bytes

lcfirst only work in PHP 5.3 or newer and as far i know Drupal Commons should work also in PHP 5.2 so is not allowed the use of lcfirst.

I replaced it for:

strtolower(substr($name ,0,1)).substr($name,1);

Is less readable but works perfectly with php 5.2 or newer.

ezra-g’s picture

Title: I get this error on install every time. Fatal error: Call to undefined function lcfirst()» undefined function lcfirst() with PHP 5.2
Status:Needs review» Fixed

Indeded - Thanks, gnuget!

I added a code comment and committed. http://drupalcode.org/project/commons_site_homepage.git/commit/04ab7d7

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.