mirror of
https://github.com/pi-hole/web.git
synced 2026-04-24 10:50:23 +01:00
Show warning in browser when fopen() failed
This commit is contained in:
@@ -21,6 +21,11 @@ else
|
||||
$file = fopen("/var/log/pihole.log","r");
|
||||
}
|
||||
|
||||
if(!$file)
|
||||
{
|
||||
die(json_encode(array("offset" => 0, "lines" => array("Failed to open log file. Check permissions!\n"))));
|
||||
}
|
||||
|
||||
if(isset($_GET["offset"]))
|
||||
{
|
||||
$offset = intval($_GET['offset']);
|
||||
|
||||
Reference in New Issue
Block a user