http_build_url icon indicating copy to clipboard operation
http_build_url copied to clipboard

handle relative urls (and use empty)

Open kolesar-andras opened this issue 10 years ago • 3 comments

Do not add leading slash to path if host is not set or empty (see also #14).

kolesar-andras avatar Nov 30 '15 15:11 kolesar-andras

Be careful, empty returns true for "0". Having an url of the format http://example.com#0 must be handled for example.

rolebi avatar Jan 15 '16 14:01 rolebi

@kolesar-andras see #14 .

pcfreak30 avatar Apr 08 '16 05:04 pcfreak30

http_build_url('https://www.google.com', [ 'query' => 'test=1', ], HTTP_URL_JOIN_QUERY);

Shouldn't this add the / to path even if it's empty?

blaaat avatar Jul 16 '18 09:07 blaaat