Page 1 of 1

s9y_200501161337.tar.gz - Division by zero in statistics

Posted: Mon Jan 17, 2005 11:25 am
by zERo
Hi,

habe gerade mal von 0.7.1 ein Update gemacht, was eigentlich auch
problemlos geklappt hat.

Klickt man im Admin-Interface auf Statistiken kommt es
u.a. bei durchschnittlichen Trackbacks und Zeichen zu einer
"division by zero" in plugins/serendipity_event_statistics/serendipity_event_statistics.php
Zeilen: 427, 431, 453.

Bin mir nicht sicher, ob das am Updaten und der schon beschriebenen Datenbank liegt
oder daran, dass noch nichts eingetragen wurde...
ist auf jeden Fall unschön so ne Nullerdivision zu haben.

Aber funktionieren tut trotzdem alles.

Gruß,
zERo

Re: s9y_200501161337.tar.gz - Division by zero in statistics

Posted: Mon Jan 17, 2005 11:55 am
by garvinhicking
Hm, those divisions by zero should only happen if you have no entries published. Is that possible? Of course statistics only make sense if you have written entries?!

Regards,
Garvin

Posted: Mon Jan 17, 2005 12:24 pm
by zERo
Sure, I cleaned my db entries during updating since the blog is still
in a test phase.

But by clicking statistics in an empty state a user not familar with
errors could be :( :shock: :cry:

It's only a minor visual thing and does not cause any problems.

Just wanted to pop it in

Posted: Mon Jan 17, 2005 12:37 pm
by garvinhicking
You are right, we should add a check just to make sure that users won't stumble there. :)

Thanks,
Garvin