From: Andrew Dolgov Date: Fri, 5 Apr 2013 14:42:59 +0000 (+0400) Subject: fix divide by zero in feeds/minute reporting (closes #668) X-Git-Tag: 1.7.9~61 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=a26f0c1759427ff23d26dc2b693b73562f9e72cd;p=tt-rss.git fix divide by zero in feeds/minute reporting (closes #668) --- diff --git a/update_daemon2.php b/update_daemon2.php index 37d6b407..c6e215a2 100755 --- a/update_daemon2.php +++ b/update_daemon2.php @@ -284,7 +284,11 @@ _debug("Elapsed time: " . (time() - $start_timestamp) . " second(s)"); if ($nf > 0) { - _debug("Feeds processed: $nf; feeds/minute: " . sprintf("%.2d", $nf/((time()-$start_timestamp)/60))); + _debug("Feeds processed: $nf"); + + if (time() - $start_timestamp > 0) { + _debug("Feeds/minute: " . sprintf("%.2d", $nf/((time()-$start_timestamp)/60))); + } } db_close($link);