[go: up one dir, main page]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implicit conversion from float 56.25 to int loses precision #335

Open
simp-lee opened this issue Nov 15, 2023 · 1 comment
Open

Implicit conversion from float 56.25 to int loses precision #335

simp-lee opened this issue Nov 15, 2023 · 1 comment

Comments

@simp-lee
Copy link

Version: 4.0.6

The Nginx server error log is as follows:

2023/11/15 10:36:33 [error] 963#0: *267013 FastCGI sent in stderr: "
PHP message: PHP Deprecated:  Implicit conversion from float 187.5 to int loses precision in .../SimpleImage.php on line 1692
PHP message: PHP Deprecated:  Implicit conversion from float 187.5 to int loses precision in .../SimpleImage.php on line 1692
PHP message: PHP Deprecated:  Implicit conversion from float 56.25 to int loses precision in .../SimpleImage.php on line 1692"
while reading response header from upstream, client: ...., server: ....com, 
request: "GET /images/big/1987229534.jpg HTTP/1.1", 
upstream: "fastcgi://unix:/tmp/php-cgi-81.sock:", 
host: "www.....com", referrer: "..."

Please help me take a look at what the issue is.

@simp-lee
Copy link
Author

I found the reason. I added an (int)round($somePara) in the parameters of my code to forcefully convert float into an int type, and the problem is solved.

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

No branches or pull requests

1 participant