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

File size check incomplete #4

Closed
kdambekalns opened this issue Nov 18, 2022 · 0 comments · Fixed by #6
Closed

File size check incomplete #4

kdambekalns opened this issue Nov 18, 2022 · 0 comments · Fixed by #6

Comments

@kdambekalns
Copy link
Contributor

As per the comment this checks for the original or optimized files being empty:

if ($filesizeOriginal === false || $filesizeOptimized === false) {

But the strict check only handles errors, not the file being empty… This leads to empty files being used happily:

Optimized image "…-305-7952x4473.jpg" with command "…" reduction 603.24 KB > 0.00 B bytes - reduction 100.00 %

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant