Skip to content

Commit c763884

Browse files
committed
explicit integer conversion
1 parent a07476f commit c763884

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/ImageResize.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -431,12 +431,12 @@ public function resizeToShortSide($max_short, $allow_enlarge = false)
431431
{
432432
if ($this->getSourceHeight() < $this->getSourceWidth()) {
433433
$ratio = $max_short / $this->getSourceHeight();
434-
$long = $this->getSourceWidth() * $ratio;
434+
$long = (int) ($this->getSourceWidth() * $ratio);
435435

436436
$this->resize($long, $max_short, $allow_enlarge);
437437
} else {
438438
$ratio = $max_short / $this->getSourceWidth();
439-
$long = $this->getSourceHeight() * $ratio;
439+
$long = (int) ($this->getSourceHeight() * $ratio);
440440

441441
$this->resize($max_short, $long, $allow_enlarge);
442442
}

0 commit comments

Comments
 (0)