-
Notifications
You must be signed in to change notification settings - Fork 61
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
Fixed _Beans_Image_Editor::run() can return path instead of url #353
base: development
Are you sure you want to change the base?
Fixed _Beans_Image_Editor::run() can return path instead of url #353
Conversation
Hey @Tsquare17, |
@christophherr, I found the problem was caused actually caused by a missing php module on my system, but what happens is that if an error occurs attempting to edit the image, instead of returning:
with the src to the edited image, beans returns:
which doesn't use beans_path_to_url, resulting in an image with src containing the path. for example: |
Thank you for providing more details 👍 |
It looks like it was introduced when refactoring after 1.5. Here is the commit. Do you mean to throw an exception rather than returning the original src? |
Thanks for the detective work, @Tsquare17 👍
You said that you were missing a PHP module and with the module things were working. |
I believe it was php-gd that was missing. People aren't likely to run into that module missing unless they're setting up their own servers and neglect to install it, like someone here... Failing gracefully would be the easy fix, and what I think was initially intended, but if you think a notice would be more appropriate, then we can certainly go that route. I'm not sure what the best way to go about that would be, but if you could help me in the right direction, I can give it a shot. |
If the image doesn't exist, and image editing fails, the absolute path is returned instead of the src.