Skip to content

Commit

Permalink
wrapped param into floatval for round()
Browse files Browse the repository at this point in the history
Wrapped $quotadata['percent'] of type string with floatval to ensure round() gets a float as param
  • Loading branch information
TDannhauer committed Apr 10, 2023
1 parent 58f5d9f commit ce49a77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Ajax/Queue.php
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ public function add(IMP_Ajax_Application $ajax)
($quotadata = $injector->getInstance('IMP_Quota_Ui')->quota($this->_quota[0], $this->_quota[1]))) {
$ajax->addTask('quota', array(
'm' => $quotadata['message'],
'p' => round($quotadata['percent']),
'p' => round(floatval($quotadata['percent'])),
'l' => $quotadata['percent'] >= 90
? 'alert'
: ($quotadata['percent'] >= 75 ? 'warn' : '')
Expand Down

0 comments on commit ce49a77

Please sign in to comment.