Skip to content

Fix URI::build if scheme is file #4

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 1 commit into from
May 18, 2018

Conversation

atalargo
Copy link
Contributor

@atalargo atalargo commented May 18, 2018

Hi
if a schema $id and $ref target a local file with file scheme (ex: 'file:///an/absolute/path/to/schema.json') the Uri::build method didn't add '//' after the 'file:' (because a local file uri, obviously, doesn't have a hostname component) so the ref loader after try to load 'file:/an/absolute/path/to/schema.json', and file_get_content didn't accept this.

I request this little fix for this case.

@sorinsarca
Copy link
Member

Thank you for the patch! I'll merge this PR.

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

Successfully merging this pull request may close these issues.

2 participants