I realized a while back that my cron job wasn't running at all. I tried to set up a server cron job and that won't run either (cPanel) So I tried running it manually by entering the url cmtravelathome.com/cron.php this works except I get this error every time:
warning: gmmktime() expects parameter 3 to be long, string given in /home/cmtrav/public_html/modules/aggregator/aggregator.module on line 785
I have looked all over drupal.org and can't seem to find any information on fixing this error - I am hoping that if I can get this error fixed then this will fix the problem with the cron job not running as well.
I welcome any suggestions however, I'm not really a programmer so please be specific in any troubleshooting instructions.
Thanks!
Judi
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | aggregator_module.patch | 1.08 KB | vladimir.dolgopolov |
Comments
Comment #1
drumm$seconds needs to be set to 0 instead of NULL when it is not included in the timestamp.
Comment #2
vladimir.dolgopolov commentedMy suggest is to use some kind of check before send values to gmmktime() as the W3C date/time format is not very strict:
Like this:
if (empty($hours)) $hours = 0;
if (empty($seconds)) $seconds = 0;
etc.
updated:
There is more interesting way: use (int) instead.
$epoch = gmmktime((int)$hours, (int)$minutes, (int)$seconds, (int)$month, (int)$day, (int)$year);
Comment #3
vladimir.dolgopolov commentedAttached patch will cast to 0 (integer) all NULLs from parsing W3C date/time format.
Comment #4
vladimir.dolgopolov commentedIs there any who had tested it?
Comment #5
dvessel commentedI tried but can't reproduce.
Comment #6
scoutbaker commentedI wasn't able to reproduce the error either.
@vladimir: Were you able to reproduce the error reported by the original poster???
Comment #7
bennybobw commentedChanging status.
Comment #8
vladimir.dolgopolov commentedI think if we use a regexp to parse string we have explicitly cast the matches.
Comment #9
fmosca commentedFrom a few quick tests i found out that $seconds should be $match[7], as $match[6] keeps the ":".
I temporarely added
$seconds = is_numeric($seconds) ? $seconds : $match[7];
before the gmmktime() invocation just to be sure.
Comment #10
j0nathan commentedsubscribing...
Comment #11
shane birley commentedJust ran into this issue:
warning: gmmktime() expects parameter 3 to be long, string given in /drupal/modules/aggregator/aggregator.module on line 668.
Comment #12
As If commentedJust ran into this issue.
warning: gmmktime() expects parameter 3 to be long, string given in /var/www/html/modules/aggregator/aggregator.module on line 666
Note that it's line 666 now. This error occurred when I updated a node with a Feed_Field in it (which depends on Aggregator).
Comment #13
Anonymous (not verified) commentedCan anyone confirm whether this is an issue with the latest release of D6? If not, I suggest we close this.
Comment #14
Anonymous (not verified) commented