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

Suppress warnings from imagecreatefromstring #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mattmcdonald-uk
Copy link

imagecreatefromstring handles warnings as errors, and throws exceptions that wouldn't impact creating images.

For example:
imagecreatefromstring(): gd-png: libpng warning: iCCP: known incorrect sRGB profile

This is a warning, and creating images work fine when the warning is ignored.

This pull request suppresses those warnings so they don't cause unnecessarily failures.

@igorhim igorhim requested a review from vadymtsots December 6, 2024 14:35
@vadymtsots
Copy link
Collaborator

Hi @mattmcdonald-uk! Could you provide more details on how to reproduce this issue? Could you share the image that you've used and PHP error reporting level that's configured on your system?

We would like to avoid suppressing the error, because we may miss other errors, that's why we'd like to try to reproduce the issue first

@mattmcdonald-uk
Copy link
Author

Sure - attached an image that causes the error.

error_reporting is set to -1

qknybkCD5aAkoibqXp7tdh4J7bkwDA743Khcjpuo

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.

2 participants