Error in Cron

When running a cron on my site i get the error.

key1

Warning: min() [function.min]: Array must contain at least one element in /home3/banumren/public_html/ratter/ratter/cron.php on line 95

Warning: max() [function.max]: Array must contain at least one element in /home3/banumren/public_html/ratter/ratter/cron.php on line 95
[ 0 ] (0 %) - 0 / 0 (beforeRefID: )

  • [cachedUntil=2014-05-14 23:02:34 (time-api-taken: 2014-05-14 22:47:34]) ]
  • wallet.dates = ( to )

the line of code it references is

[php]
* wallet.dates = ( “.$dates1[ min($dates) ].” to “.$dates1[ max($dates) ].” ) \n
\n[/php]

the code worked fine in 2010-2011 and im trying to bring it back to life . Any suggestions on how to fix the error.

Well, the error message says “wallet.dates = ( to )”… No dates in it.

So, you should look at where the $dates1[ min($dates) ] is created.

Either the index into $dates1 is bad or nothing is in $dates1…

Just before this line place a debug line in, something like:

[php]
die ( “$dates=”.$dates."
$dates1[$dates]=".$dates1[$dates]."
");
[/php]
This will show what is inside your variables before it is executed and you can see what is missing.
Then, work back in your code to find out why the empty one is empty.

Normally you would test for empty dates before calling the crone. If empty dates, then display an error,
if not empty, then run the crone…

Hope that helps…

Sponsor our Newsletter | Privacy Policy | Terms of Service