8000 fix(images): Unhandled stream exception by marlonbasten · Pull Request #11739 · pimcore/pimcore · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix(images): Unhandled stream exception #11739

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

Merged
merged 5 commits into from
Apr 25, 2022
Merged

fix(images): Unhandled stream exception #11739

merged 5 commits into from
Apr 25, 2022

Conversation

marlonbasten
Copy link
Contributor

Changes in this pull request Resolves

With this fix it informs the developer that they may have forgot to install the imagick plugin.

Additional info

When trying to load an SVG file the following function throws a null error without providing any information why.

When trying to load an SVG file the following function throws a null error without providing any information why.
With this fix it informs the developer that they may have forgot to install the imagick plugin.
@CLAassistant
Copy link
CLAassistant commented Mar 22, 2022

CLA assistant check
All committers have signed the CLA.

@brusch
Copy link
Member
brusch commented Mar 23, 2022

Hmm, don't see this connected with Imagick - also getStream() can return null - so probably this is the wrong place for your fix?

@marlonbasten
Copy link
Contributor Author

@brusch Yeah, that's exactly the problem that getStream() can return null. It throws a null exception on the get-image-thumbnail route in the AdminBundle when trying to load SVGs without having Imagick installed.

@marlonbasten
Copy link
Contributor Author

image

That's the error I'm trying to make clearer for users.

@brusch
Copy link
Member
brusch commented Mar 28, 2022

Thanks for your feedback.
Still, I'd add the null check in the action and log the message there if the thumbnail couldn't be generated (whatever the reason is, could be other image formats such as PSD as well). In this case the action should return the error image.
Can you please update the PR accordingly? Thanks a lot!

@brusch brusch added this to the 10.3.4 milestone Mar 28, 2022
@brusch brusch added the Bug label Mar 28, 2022
@brusch brusch modified the milestones: 10.3.4, 10.3.5 Mar 30, 2022
@brusch
Copy link
Member
brusch commented Apr 4, 2022

@marlonbasten 🏓

@marlonbasten
Copy link
Contributor Author

Sorry for the late response! Will do a PR tomorrow, thanks for the ping!

@brusch
Copy link
Member
brusch commented Apr 11, 2022

@marlonbasten 🏓🙃 Thanks!

@fashxp fashxp modified the milestones: 10.3.5, 10.3.6 Apr 13, 2022
@brusch
Copy link
Member
brusch commented Apr 21, 2022

@marlonbasten last call 😉 Thanks in advance!

@marlonbasten
Copy link
Contributor Author

@brusch Should be done now. I didn't read the "action should return the error image" part. Thanks for being so patient with me :)

@brusch
Copy link
Member
brusch commented Apr 25, 2022

Just directly added the missing annotation reported by PhpStan.

@brusch brusch merged commit db74932 into pimcore:10.3 Apr 25, 2022
@brusch
Copy link
Member
brusch commented Apr 25, 2022

Thank you very much!

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

Successfully merging this pull request may close these issues.

4 participants
0