Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I got the following Notice while using the last image-generator version:
I have seen that similar fixes have already been applied to other parts of the codebase, but these two lines were missing.
To address this, I have explicitly cast the floating-point values to integers where
$x
and$y
coordinates are calculated. This change aligns with the fixes made elsewhere in the code by you and ensures compatibility with PHP 8's type enforcement, preventing the deprecation notice related to precision loss during the float-to-int conversion. This should maintain the functionality while adhering to PHP 8's stricter type requirements.I hope you can add this fix into the main codebase. This modification has resolved the issue in my environment, and I believe it would be beneficial for other users as well. Looking forward to seeing this enhancement in the next update of the image-generator. :)