The captcha_cron() function logs error messages like

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

It looks like the code doesn't check if there are any temp files to delete in the first place. PHP isn't my native language, otherwise I'd include what should be a trivial patch.

CommentFileSizeAuthor
#3 captcha.module.patch476 bytesfallacious

Comments

fallacious’s picture

Title: cron run error messages » cron run patch

Here's a patch to suppress the cron run errors. It seems to work for me, but YMMV.

arnabdotorg’s picture

Assigned: Unassigned » arnabdotorg

Couldn't find your patch, did you attach it?

Anyway, added a check to see if glob returns an array to solve the warnings; commited to CVS/4.5.

fallacious’s picture

StatusFileSize
new476 bytes

Here it is again, if only for historical reasons.

arnabdotorg’s picture