SiT! Bugs - SiT!
View Issue Details
0001955SiT!dashboardpublic2014-10-15 17:022015-04-25 14:17
dipohl 
 
normalminoralways
resolvedfixed 
LinuxLinux2.6+later
3.67 LTS 
Current SVN 
0001955: Division by zero in dashboard_my_incidents.php
From SiT! error log:

2014-10-15T17:54:25+02:00 ajaxdata.php Warning [2] Division by zero (in line 215 of file dashboard_my_incidents.php)
2014-10-15T17:54:25+02:00 ajaxdata.php Warning [2] Division by zero (in line 215 of file dashboard_my_incidents.php)
2014-10-15T17:54:31+02:00 ajaxdata.php Warning [2] Division by zero (in line 87 of file dashboard_my_incidents.php)
2014-10-15T17:54:31+02:00 ajaxdata.php Warning [2] Division by zero (in line 87 of file dashboard_my_incidents.php)
No tags attached.
Issue History
2014-10-15 17:02dipohlNew Issue
2014-10-15 17:20dipohlNote Added: 0004960
2015-04-25 14:16paulhNote Added: 0004969
2015-04-25 14:16paulhStatusnew => assigned
2015-04-25 14:16paulhResolutionopen => fixed
2015-04-25 14:16paulhFixed in Version => Current SVN
2015-04-25 14:17paulhStatusassigned => resolved

Notes
(0004960)
dipohl   
2014-10-15 17:20   
I fixed it with the following changes:

# diff dashboard_my_incidents.php dashboard_my_incidents.php.mine
87c87,89
< $i_sla_remain_percent = round((1-(($i_sla_remain/$i_sla_target)))*100);
---
> if ($i_sla_target != 0) {
> $i_sla_remain_percent = round((1-(($i_sla_remain/$i_sla_target)))*100);
> }
215c217,219
< $i_sla_remain_percent = round((1-(($i_sla_remain/$i_sla_target)))*100);
---
> if ($i_sla_target != 0) {
> $i_sla_remain_percent = round((1-(($i_sla_remain/$i_sla_target)))*100);
> }
(0004969)
paulh   
2015-04-25 14:16   
r7599 fixes, thanks dipohl