Closed (fixed)
Project:
Poormanscron
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
13 Aug 2005 at 21:39 UTC
Updated:
8 Sep 2005 at 03:34 UTC
Hi,
since installing the Google-sitemap-module and upgrading poormanscron-module to cvs I'm getting a few of the following warnings in the drupal log lately:
"Invalid argument supplied for foreach() in [...]/modules/poormanscron/poormanscron.module in Zeile 67."
Host is always GoogleBot (66.249.66.105), but it happens very irregularly.
The directory is /gsitemap, but it doesn't matter if the content of my site has changed or not...
Note sure if this is poormanscron's fault, or the sitemap-module...
Comments
Comment #1
Merlin Abraxas commentedHmmm ... maybe too complicated thinking ...
Don't get me wrong, it is a great module!
After the study of cron.php I took all 'message' related lines out and poormanscron-module is working fine since - better without the nasty error messages in the log file.
I'm watching the log carefully and I can't see any impact on other modules after my code change on poormanscron-module.
;-)
Comment #2
oNyx commentedLooks like a simple isset() check prior to rebuilding the messages helps (end of poormanscron_exit()). And it should be fine if you dont restore the messages if there arent any messages to begin with.
I verfied this somewhat blind guess by changing the watchdog message to this:
watchdog('regular', 'Cron run completed ('.isset($saved_messages).').',WATCHDOG_NOTICE);
If the newsfeed is requested by some anonymous user the message is "Cron run completed()" otherwise its "Cron run completed(1)". So, yea... it might happen that the variable $saved_messages is NULL, which in turn causes that php error message.
HTH :)
Comment #3
Uwe Hermann commentedFixed in HEAD and 4-6 (tarballs will be rebuilt in a few hours). Please reopen if there are problems.
Comment #4
florre commentedlooks good :-)
Comment #5
Uwe Hermann commented