Skip to content

Commit

Permalink
Merge pull request #113 from StefanSchuechl/patch-1
Browse files Browse the repository at this point in the history
Fix `parse_url()` path error on home page in Rules\ThreeSegmentUrls
  • Loading branch information
jesseleite authored Aug 25, 2020
2 parents abd1697 + 83dccac commit df00be1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Reporting/Rules/ThreeSegmentUrls.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function siteWarningComment()

public function processPage()
{
$url = parse_url($this->page->url())['path'];
$url = parse_url($this->page->url())['path'] ?? '/';
$this->slashes = substr_count($url, '/');
}

Expand Down

0 comments on commit df00be1

Please sign in to comment.