Skip to content

Commit 39066a3

Browse files
Merge pull request #181 from Internacionalweb/fixed-return-getcropposition
Modified return type to avoid implicit float to int conversion
2 parents c8acaa8 + 23d7a71 commit 39066a3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/ImageResize.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -740,7 +740,7 @@ public function getDestHeight()
740740
*
741741
* @param integer $expectedSize
742742
* @param integer $position
743-
* @return float|integer
743+
* @return integer
744744
*/
745745
protected function getCropPosition($expectedSize, $position = self::CROPCENTER)
746746
{
@@ -758,7 +758,7 @@ protected function getCropPosition($expectedSize, $position = self::CROPCENTER)
758758
$size = $expectedSize / 4;
759759
break;
760760
}
761-
return $size;
761+
return (int) $size;
762762
}
763763

764764
/**

0 commit comments

Comments
 (0)