From 7e6d07762f9e09cf1afd06008785a28293240295 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bar=C4=B1=C5=9F=20Metin?= Date: Wed, 24 Jun 2009 10:53:06 +0000 Subject: [PATCH] fix div-by-zero error --- planetlab/includes/plc_objects.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/planetlab/includes/plc_objects.php b/planetlab/includes/plc_objects.php index db354bc..a51e2f5 100644 --- a/planetlab/includes/plc_objects.php +++ b/planetlab/includes/plc_objects.php @@ -25,7 +25,7 @@ function timeDiff ($timestamp,$detailed=false,$n = 0) { # Go from decades backwards to seconds $i = sizeof($lengths) - 1; # Size of the lengths / periods in case you change them $time = ""; # The string we will hold our times in - while($i >= $n) { + while($i > $n) { # if the difference is greater than the length we are checking... continue if ($diff > $lengths[$i-1]) { # 65 / 60 = 1. That means one minute. 130 / 60 = 2. Two minutes.. etc -- 2.47.0