Skip to content

Commit

Permalink
Cast args explicitly to int
Browse files Browse the repository at this point in the history
  • Loading branch information
yhabteab committed Aug 21, 2023
1 parent 0e9dc71 commit c58b2a1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions application/controllers/GraphController.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ protected function supplyImage($object, $checkCommand, $obscuredCheckCommand)
$charts[0]
->setFrom($this->graphParams['start'])
->setUntil($this->graphParams['end'])
->setWidth($this->graphParams['width'])
->setHeight($this->graphParams['height'])
->setWidth((int) $this->graphParams['width'])
->setHeight((int) $this->graphParams['height'])
->setBackgroundColor($this->graphParams['bgcolor'])
->setForegroundColor($this->graphParams['fgcolor'])
->setMajorGridLineColor($this->graphParams['majorGridLineColor'])
Expand Down
4 changes: 2 additions & 2 deletions application/controllers/MonitoringGraphController.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ protected function supplyImage($object, $checkCommand, $obscuredCheckCommand)
$charts[0]
->setFrom($this->graphParams['start'])
->setUntil($this->graphParams['end'])
->setWidth($this->graphParams['width'])
->setHeight($this->graphParams['height'])
->setWidth((int) $this->graphParams['width'])
->setHeight((int) $this->graphParams['height'])
->setBackgroundColor($this->graphParams['bgcolor'])
->setForegroundColor($this->graphParams['fgcolor'])
->setMajorGridLineColor($this->graphParams['majorGridLineColor'])
Expand Down
4 changes: 2 additions & 2 deletions library/Graphite/Web/Widget/Graphs.php
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,8 @@ protected function getGraphsList()
if ($this->renderInline) {
$chart->setFrom($this->start)
->setUntil($this->end)
->setWidth($actwidth)
->setHeight($actheight)
->setWidth((int) $actwidth)
->setHeight((int) $actheight)
->setBackgroundColor('white')
->setForegroundColor('black')
->setMajorGridLineColor('grey')
Expand Down

0 comments on commit c58b2a1

Please sign in to comment.