From 1122cf307e7804b6702e3c3e82b27bd3766309ea Mon Sep 17 00:00:00 2001 From: DL6ER Date: Wed, 21 Dec 2016 14:57:27 +0100 Subject: [PATCH] Check if file is readable --- scripts/pi-hole/php/data.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/pi-hole/php/data.php b/scripts/pi-hole/php/data.php index 76c94798..1c255e6d 100644 --- a/scripts/pi-hole/php/data.php +++ b/scripts/pi-hole/php/data.php @@ -5,7 +5,7 @@ $hosts = file_exists("/etc/hosts") ? file("/etc/hosts") : array(); function checkfile($filename) { - if(file_exists($filename)) + if(file_readable($filename)) { return $filename; }