Skip to content

Commit

Permalink
fix: home page purging can cause an empty array value
Browse files Browse the repository at this point in the history
which in turn throws an error, so strip empty array values out
  • Loading branch information
Nathan Glasl committed Dec 22, 2020
1 parent e9596fe commit 6bb7352
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Cloudflare.php
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ private function getLinksToPurgeByPage(SiteTree $page)
if ($this->isHomePage($page)) {
$files[] = substr($pageLink, 0, (strrpos($pageLink, '/home')));
}
return $files;
return array_filter($files);
}

/**
Expand Down

0 comments on commit 6bb7352

Please sign in to comment.