Skip to content

Commit

Permalink
Fix parse_url() path error on home page in Rules\ThreeSegmentUrls
Browse files Browse the repository at this point in the history
The report queue fails as soon as it gets to the home page. This is caused by the missing path index.

Same fix as abd1697 for similar bug #111 .
  • Loading branch information
StefanSchuechl authored Aug 25, 2020
1 parent abd1697 commit 83dccac
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 83dccac

Please sign in to comment.