sabre-io / uri

:earth_asia: Functions for making sense out of URIs in PHP

Home Page:http://sabre.io/uri/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

resolve replaces path when resolving a fragment

matt-allan opened this issue · comments

\Sabre\Uri\resolve('http://www.mydomain.com/somewhere.json', '#');

Expected output:

http://www.mydomain.com/somewhere.json

(or http://www.mydomain.com/somewhere.json#

Actual Output:

http://www.mydomain.com/#

This seems to be because Sabre\Uri\parse('#') returns "path" => "#".

parse_url('#') returns []. It looks like _parse_fallback is returning the path as #.

Thanks @evert!