File savesettings.php-better-error-handling.patch of Package pihole-admin-lte
Index: AdminLTE-5.18/scripts/pi-hole/php/savesettings.php
===================================================================
--- AdminLTE-5.18.orig/scripts/pi-hole/php/savesettings.php
+++ AdminLTE-5.18/scripts/pi-hole/php/savesettings.php
@@ -45,7 +45,7 @@ function readStaticLeasesFile($origin_fi
return false;
}
- $dhcpstatic = @fopen($origin_file, 'r');
+ $dhcpstatic = fopen($origin_file, 'r');
if (!is_resource($dhcpstatic)) {
return false;
}
@@ -107,7 +107,7 @@ function readDNSserversList()
{
// Reset list
$list = array();
- $handle = @fopen('/etc/pihole/dns-servers.conf', 'r');
+ $handle = fopen('/etc/pihole/dns-servers.conf', 'r');
if ($handle) {
while (($line = fgets($handle)) !== false) {
$line = rtrim($line);