Skip to content

Url::getHostUrl() returns scheme only when host is '0' #158

@spaze

Description

@spaze

Version: master (3.0.1)

Bug Description

$url->getHostUrl() returns just scheme when the host is 0.

$url = new Url('https://0/0');
$url->getHostUrl();  // https:

Steps To Reproduce

This is a failing test

$url = new Url('https://0/0');
Assert::same('https://0', $url->getHostUrl());

Expected Behavior

The host (0) should be included.

Possible Solution

I'll send a PR in a second.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions