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
getimagesizefromstring
Error
#249
Comments
Yes, that error should be silenced, because |
Thanks so much @oscarotero! |
sorry to re open this issue but I tried with a link and I get this error : getimagesizefromstring(): Read error! |
Thanks for notify this. It's fixed here 87aa0ed |
Thank you for your plugin (oscarotero/Embed) the best php script ever |
First off - thanks for an awesome project!!
I've bumped into an issue where attempting to call
$info->providerIcon
from my Embed object resulted in angetimagesizefromstring(): read error!
The URL fed to the
Embed
constructor washttps://www.vox.com
.e.g.
What seems to be happening is the call to
https://www.vox.com/favicon.ico
(which is always made, is returning a404
with plain text type content of "Not Found". (in contrast with most sites which would generally return some HTML)When this string is given as an argument to the
CurlDispatcher
s getimagesizefromstring method, it errors out for some reason.(Oddly enough it doesn't error out if the string contains HTML of some sort (Which I imagine is why this error doesn't occur with most sites that actually return some richer
text/html
response content), which is probably why this doesn't break ordinarily for other sites that 404 from
/favicon.ico
, it only seems to freak out when it's a plain string, which in the case of Vox - it is).This error wasn't occurring in another project where we were using
Embed
. And I believe this is because that project was using an older version that did not contain these changes (ref #242) which cause theonBody
function toreturn
when the data type was off, before attempting to call thegetimagefromstring
.Thanks very much in advance for your time! Please let me know if there's any way I can help with a fix for this admittedly somewhat edge case.
The text was updated successfully, but these errors were encountered: