Ticket #615 (closed defect: fixed)

Opened 3 months ago

Last modified 3 months ago

floating-point number handling bug in cron

Reported by: ayunyan Owned by:
Priority: major Milestone: Undetermined
Component: Habari Core Software Version: SVN
Keywords: cron Cc:

Description

error of a floating-point is not taken into consideration in cron.
this floating-point values is used for comparison in crontab.php:70. therefore, cron does not work in specific environment
I think that should round the floating-point value.

How-To-Repeat

// Code

$run_time = microtime(true) + 600;
$result = DB::get_row('SELECT ? AS cron_running;', array($run_time));
var_dump($result->cron_running);
var_dump($run_time);

// Result

string(17) "1219916606.496059"
float(1219916606.4961)

Attachments

crontab.php.r2393.diff (366 bytes) - added by ayunyan 3 months ago.

Change History

Changed 3 months ago by ayunyan

Changed 3 months ago by MattRead

  • status changed from new to closed
  • resolution set to fixed

fixed in r2394

Note: See TracTickets for help on using tickets.