Skip to content

Conversation

@Alkl58
Copy link

@Alkl58 Alkl58 commented Jan 16, 2026

This PR fixes the warning:

Implicit conversion from float 7.2 to int loses precision in /vendor/intervention/image/src/Image.php on line 617

Reason for this warning is that the text function expects int values for the $x and $y points.

Since PHP 8.1 this warning notice is emmited, as implicit float -> int conversion is being deprecated.

This PR simply casts the floats to integers explicitly.

Not sure if it would be better to round, floor, or ceil the values?

@Alkl58 Alkl58 changed the title Explicit float to int typecast Explicit float to int typecast - fixes #311 Jan 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant