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

Pathinfo extension undefined #37

Closed
tcitworld opened this issue Mar 16, 2016 · 6 comments
Closed

Pathinfo extension undefined #37

tcitworld opened this issue Mar 16, 2016 · 6 comments

Comments

@tcitworld
Copy link
Contributor

I exported two articles containing a lot of different pictures and some of them seem to not return any information through pathinfo, leading to failure.
Therefore, pathinfo($internalSrc); returns undefined here. It should be tested before next conditional.

@Grandt
Copy link
Owner

Grandt commented Mar 16, 2016

Do you happen to have an example of a path leading to an undefined return from pathinfo?
I'm adding $iSrcInfo != null && to the if statement following the call, that should protect it if pathinfo returns an undefined result.

@tcitworld
Copy link
Contributor Author

The two articles were this one and this other one. There's at least two different pictures concerned.

@Grandt
Copy link
Owner

Grandt commented Mar 16, 2016

So the issue is not that pathinfo returns an undefined result, but that $iSrcInfo['extension'] is undefined as the link doesn't always have an extension.

I'll apply a fix for that assumption, and post 4.0.7 in a few minutes.

@tcitworld
Copy link
Contributor Author

I thought so too, but I seem to recall to have var_dumped $iSrcInfo once without success.

@Grandt
Copy link
Owner

Grandt commented Mar 16, 2016

pathinfo shouldn't return an undefined at all. Try 4.0.7 I just posted to packagist, if that fails, I'll have to check further.

@tcitworld
Copy link
Contributor Author

Works fine. 👍

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

2 participants