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.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | captcha.module.patch | 476 bytes | fallacious |
Comments
Comment #1
fallacious commentedHere's a patch to suppress the cron run errors. It seems to work for me, but YMMV.
Comment #2
arnabdotorg commentedCouldn'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.
Comment #3
fallacious commentedHere it is again, if only for historical reasons.
Comment #4
arnabdotorg commented