Active
Project:
Subscription
Version:
4.6.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 Feb 2006 at 08:57 UTC
Updated:
3 Feb 2006 at 08:57 UTC
function subscription_cron(), lines 260 to 265:
$last_daily = floor(variable_get('subscription_last_daily', 0) / (60 * 60 * 24) );
if ( floor($now / (60 * 60 * 24)) > $last_daily) ) {
subscription_trigger(_subscription_invoke_cron($last_daily, $now), true);
}
variable_set('subscription_last_daily', $now);
This is wrong in two ways:
This is how the code should look like:
$last_daily = variable_get('subscription_last_daily', 0);
if ( floor($now / (60 * 60 * 24)) > floor($last_daily / (60 * 60 * 24)) ) {
subscription_trigger(_subscription_invoke_cron($last_daily, $now), true);
variable_set('subscription_last_daily', $now);
}