فهرست منبع

fix divide by zero in feeds/minute reporting (closes #668)

Andrew Dolgov 11 سال پیش
والد
کامیت
a26f0c1759
1فایلهای تغییر یافته به همراه5 افزوده شده و 1 حذف شده
  1. 5 1
      update_daemon2.php

+ 5 - 1
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);