Skip to content

Commit c58b2a1

Browse files
committed
Cast args explicitly to int
1 parent 0e9dc71 commit c58b2a1

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

application/controllers/GraphController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,8 @@ protected function supplyImage($object, $checkCommand, $obscuredCheckCommand)
152152
$charts[0]
153153
->setFrom($this->graphParams['start'])
154154
->setUntil($this->graphParams['end'])
155-
->setWidth($this->graphParams['width'])
156-
->setHeight($this->graphParams['height'])
155+
->setWidth((int) $this->graphParams['width'])
156+
->setHeight((int) $this->graphParams['height'])
157157
->setBackgroundColor($this->graphParams['bgcolor'])
158158
->setForegroundColor($this->graphParams['fgcolor'])
159159
->setMajorGridLineColor($this->graphParams['majorGridLineColor'])

application/controllers/MonitoringGraphController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,8 @@ protected function supplyImage($object, $checkCommand, $obscuredCheckCommand)
135135
$charts[0]
136136
->setFrom($this->graphParams['start'])
137137
->setUntil($this->graphParams['end'])
138-
->setWidth($this->graphParams['width'])
139-
->setHeight($this->graphParams['height'])
138+
->setWidth((int) $this->graphParams['width'])
139+
->setHeight((int) $this->graphParams['height'])
140140
->setBackgroundColor($this->graphParams['bgcolor'])
141141
->setForegroundColor($this->graphParams['fgcolor'])
142142
->setMajorGridLineColor($this->graphParams['majorGridLineColor'])

library/Graphite/Web/Widget/Graphs.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,8 +313,8 @@ protected function getGraphsList()
313313
if ($this->renderInline) {
314314
$chart->setFrom($this->start)
315315
->setUntil($this->end)
316-
->setWidth($actwidth)
317-
->setHeight($actheight)
316+
->setWidth((int) $actwidth)
317+
->setHeight((int) $actheight)
318318
->setBackgroundColor('white')
319319
->setForegroundColor('black')
320320
->setMajorGridLineColor('grey')

0 commit comments

Comments
 (0)