diff --git a/advanced/index.php b/advanced/index.php
index d097fe0f..041939a7 100644
--- a/advanced/index.php
+++ b/advanced/index.php
@@ -102,7 +102,8 @@ if ($serverName === "pi.hole") {
$bpAskAdmin = !empty($svEmail) ? '' : "";
// Determine if at least one block list has been generated
-if (empty(glob("/etc/pihole/list.0.*.domains")))
+$blocklistglob = glob("/etc/pihole/list.0.*.domains");
+if ($blocklistglob = "")
die("[ERROR] There are no domain lists generated lists within /etc/pihole/
! Please update gravity by running pihole -g
, or repair Pi-hole using pihole -r
.");
// Set location of adlists file