Details
-
Type: Bug
-
Status: Closed
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 5.5.2
-
Component/s: None
-
Labels:None
Description
There are a few control panels with this issue
- APISCP
- CentovaCast
- cPanel
- Plesk
It appears in each in the tab_client_stats.pdt view file. The lines look something like this
$percent_used = ($unlimited ? 0 : round(((isset($disk['used']) ? $disk['used'] : 0)/(isset($disk['limit']) ? $disk['limit'] : null))*100, 0)); $percent_used = ($unlimited ? 0 : round(((isset($bandwidth['used']) ? $bandwidth['used'] : 0)/(isset($bandwidth['limit']) ? $bandwidth['limit'] : null))*100, 0));
But $bandwidth['limit'] and $disk['limit'] can technically be 0 and null is no a valid default for the ternary. We should use min(..., 1) to ensure a valid division.
Activity
Jonathan Reissmueller
created issue -
Jonathan Reissmueller
made changes -
Field | Original Value | New Value |
---|---|---|
Rank | Ranked higher |
Jonathan Reissmueller
made changes -
Fix Version/s | 5.6.0-b1 [ 11730 ] | |
Fix Version/s | Short Term [ 10800 ] |
Jonathan Reissmueller
made changes -
Priority | Major [ 3 ] | Minor [ 4 ] |
Jonathan Reissmueller
made changes -
Sprint | 5.6.0 Sprint 2 [ 158 ] |
Jonathan Reissmueller
made changes -
Rank | Ranked lower |
Jonathan Reissmueller
made changes -
Sprint | 5.6.0 Sprint 3 [ 158 ] | 5.6.0 Sprint 2 [ 167 ] |
Jonathan Reissmueller
made changes -
Rank | Ranked higher |
Jonathan Reissmueller
made changes -
Fix Version/s | 5.5.2 [ 11736 ] | |
Fix Version/s | 5.6.0-b1 [ 11730 ] |
Abdy Franco
made changes -
Assignee | Abdy Franco [ abdy ] |
Abdy Franco
made changes -
Remaining Estimate | 0 minutes [ 0 ] | |
Time Spent | 1 hour, 32 minutes [ 5520 ] | |
Worklog Id | 15954 [ 15954 ] |
Abdy Franco
made changes -
Time Spent | 1 hour, 32 minutes [ 5520 ] | 3 hours, 33 minutes [ 12780 ] |
Worklog Id | 15955 [ 15955 ] |
Abdy Franco
made changes -
Status | Open [ 1 ] | In Review [ 5 ] |
Resolution | Fixed [ 1 ] |
Jonathan Reissmueller
made changes -
Status | In Review [ 5 ] | Closed [ 6 ] |