FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Bug Reports » Division by Zero in Compact Message
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Division by Zero in Compact Message [message #29780 is a reply to message #29762] Sat, 14 January 2006 23:40 Go to previous messageGo to previous message
djechelon is currently offline  djechelon   Italy
Messages: 46
Registered: July 2005
Karma:
Member
Sorry, but it didn't work completely.

Now I see that ETA is calculated on other steps, but still I got that error.
I looked inside the code and found that the cause is not directly the absence of private messages in the board.

The ETA function is the thing that messes up everything.
I got the error on its 4th line, where the division is. Maybe because PMs are none, but I couldn't deeply analyze the code
<?php
function eta_calc($start$pos$pc)
{
        
$cur time();
        
$prg $pos $pc;
        
$eta = ($cur $start) / $prg * (10 $prg);
        if (
$eta 60) {
                echo (
$prg 10) . "% done<br>\nETA: ".sprintf('%.2f'$eta/60)." minutes<br>\n";
        } else {
                echo (
$prg 10) . "% done<br>\nETA: " $eta " seconds<br>\n";
        }
}
?>

If $pc is zero, theorycally $prg is infinite and $eta is a finite number (equal to $cur-$start).)
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Error : Invalid group id when Mass Emailing
Next Topic: Query failed
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Nov 27 23:19:32 GMT 2024

Total time taken to generate the page: 0.03853 seconds