From 6bb73526a2814914ffac51278f3a02747f5da187 Mon Sep 17 00:00:00 2001 From: Nathan Glasl Date: Tue, 22 Dec 2020 15:56:38 +1100 Subject: [PATCH] fix: home page purging can cause an empty array value which in turn throws an error, so strip empty array values out --- src/Cloudflare.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Cloudflare.php b/src/Cloudflare.php index 2c3a6ae..48f5d48 100644 --- a/src/Cloudflare.php +++ b/src/Cloudflare.php @@ -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); } /**