Skip to content

Catch runtime exception on invalid images#175

Open
koertho wants to merge 1 commit intopdir:mainfrom
koertho:fix/imagine-error
Open

Catch runtime exception on invalid images#175
koertho wants to merge 1 commit intopdir:mainfrom
koertho:fix/imagine-error

Conversation

@koertho
Copy link

@koertho koertho commented Jun 12, 2025

This PR fix a runtime exception when a broken image is loaded.

Background: In our current project the facebook api sometimes returns an image of 0 byte. When the social feed is show in the frontend, the complete page is broken due an Runtime Exception. This PR catch the exception, so the page still works even when there is a broken image.

Maybe we will further investigate why the api is returning a broken image and add an additional fix, but for now this fix the issue.

Tested on contao 5.3 and php 8.3.
Based on current main branch.

@vvohh vvohh force-pushed the fix/imagine-error branch from 289a2ef to 944854d Compare August 25, 2025 13:51
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