How can I get the cron patch?

daniel read - November 12, 2004 - 00:23
Project:CAPTCHA
Version:4.5.x-1.x-dev
Component:Miscellaneous
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed
Description

Hello,

I am experiencing the captcha bug in the captcha_cron function that I saw referred to in the patch section. The captch module code is not accounting for the fact that there might not be any files to delete, so you get this error:

warning: Invalid argument supplied for foreach() in /[path_removed]/modules/captcha.module on line 28.

I'm getting this error emaied to me once an hour, so it's a bit annoying. :-) I see that someone has uploaded a patch that fixes this error, but I can't seem to figure out how to obtain it. Can someone either a) tell me how I can get the patch, or b) tell me how I can change this code myself to get rid of the error:

function captcha_cron() {
  //Clean up old images
  foreach (glob(variable_get("captcha_image_path", "")."/captcha*.png") as $filename) {
    unlink($filename);
  }
}

Thanks,
Dan Read

#1

arnabdotorg - November 14, 2004 - 17:27

Changes made to CVS / 4.5, please checkout / download from drupal.org itself.

 
 

Drupal is a registered trademark of Dries Buytaert.