You may want to note on the project page and readme that there is a PHP 5.3.x requirement for the module or add in some workarounds. I ran into an lcfirst() issue testing http://drupal.org/project/qa_checklist which tipped me off.

Comments

TravisCarden’s picture

Component: Documentation » Code
Assigned: Unassigned » TravisCarden
Category: task » bug

Thanks for the report, @chales! I'd rather make the module compatible with PHP 5.2. lcfirst() is an easy one to fix. I'll see if there are any others and then commit a fix. I appreciate the feedback!

chales’s picture

I did change

function checklistapi_strtolowercamel($string) {
  $string = str_replace('_', ' ', $string);
  $string = ucwords($string);
  $string = str_replace(' ', '', $string);
  return lcfirst($string);
}

to

function checklistapi_strtolowercamel($string) {
  $string = str_replace('_', ' ', $string);
  $string = ucwords($string);
  $string = str_replace(' ', '', $string);
  return substr_replace($string, strtolower(substr($string, 0, 1)), 0, 1);
}

but I received another error immediately so I assumed there were more incompatibilities and switched to testing under a 5.3. I'll take another look and roll a patch for you.

TravisCarden’s picture

Assigned: TravisCarden » Unassigned

A patch would be much appreciated while I try to get a PHP 5.2 environment to test against. Thanks!

TravisCarden’s picture

Title: Note there is a PHP 5.3.x requirement » Eliminate PHP 5.3 dependency
Status: Active » Fixed

I got a test environment, and I didn't find any issues other than lcfirst(). The change has been committed. Thanks for the help!

chales’s picture

Confirmed! It looks like the other issues are in qa_checklist.

Thanks for the project. I've already come up with a number of ways to put it to good use.

TravisCarden’s picture

Thank you, @chales. I haven't found any PHP 5.3 issues in qa_checklist. If you have, please file an issue for them in that queue.

I'm glad you're putting the project to use! Please keep giving me feedback so I can make it better! :)

Status: Fixed » Closed (fixed)

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