Skip to content

Commit

Permalink
DD-1429 : avoid "Error when visiting" error
Browse files Browse the repository at this point in the history
  • Loading branch information
guardiola86 committed Jul 4, 2019
1 parent d5e8d08 commit 2732129
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Dennis/Link/Checker/Analyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,11 @@ public function link(LinkInterface $link) {
else {
$url = $src;
}

// If url is protocol neutral, force it to use http.
if (substr( $url, 0, 2 ) === "//") {
$url = ltrim($url, '//');
$url = 'http://' . $url;
}
try {
$info = $this->followRedirects($url);
$link->setFoundUrl($info['url'])
Expand Down

0 comments on commit 2732129

Please sign in to comment.