mirror of
https://github.com/pi-hole/pi-hole
synced 2025-01-03 12:40:56 +00:00
Merge pull request #2176 from rrobgill/php5fix
Fix block page crash on PHP 5.4
This commit is contained in:
commit
3f3254a4df
@ -102,8 +102,10 @@ if ($serverName === "pi.hole") {
|
|||||||
$bpAskAdmin = !empty($svEmail) ? '<a href="mailto:'.$svEmail.'?subject=Site Blocked: '.$serverName.'"></a>' : "<span/>";
|
$bpAskAdmin = !empty($svEmail) ? '<a href="mailto:'.$svEmail.'?subject=Site Blocked: '.$serverName.'"></a>' : "<span/>";
|
||||||
|
|
||||||
// Determine if at least one block list has been generated
|
// 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 === array()) {
|
||||||
die("[ERROR] There are no domain lists generated lists within <code>/etc/pihole/</code>! Please update gravity by running <code>pihole -g</code>, or repair Pi-hole using <code>pihole -r</code>.");
|
die("[ERROR] There are no domain lists generated lists within <code>/etc/pihole/</code>! Please update gravity by running <code>pihole -g</code>, or repair Pi-hole using <code>pihole -r</code>.");
|
||||||
|
}
|
||||||
|
|
||||||
// Set location of adlists file
|
// Set location of adlists file
|
||||||
if (is_file("/etc/pihole/adlists.list")) {
|
if (is_file("/etc/pihole/adlists.list")) {
|
||||||
|
Loading…
Reference in New Issue
Block a user