Skip to content

Remote assets beginning with // fail to load #43

@benswinburne

Description

@benswinburne

When loading remote assets using just // instead of http(s):// causes the following issue

ErrorException [ Warning ]: file_get_contents(//fonts.googleapis.com/css?family=Open+Sans:300,400,600): failed to open stream: No such file or directory

Adding the following code to load_file() resolves the problem.

if (strpos($filename, '//') === 0)
{
    $protocol = \Input::server('https', false) ? 'https:' : 'http:';
    $filename = $protocol.$filename;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions