File savesettings.php-better-error-handling.patch of Package pihole-admin-lte
23
1
Index: AdminLTE-5.18/scripts/pi-hole/php/savesettings.php
2
===================================================================
3
--- AdminLTE-5.18.orig/scripts/pi-hole/php/savesettings.php
4
+++ AdminLTE-5.18/scripts/pi-hole/php/savesettings.php
5
6
return false;
7
}
8
9
- $dhcpstatic = @fopen($origin_file, 'r');
10
+ $dhcpstatic = fopen($origin_file, 'r');
11
if (!is_resource($dhcpstatic)) {
12
return false;
13
}
14
15
{
16
// Reset list
17
$list = array();
18
- $handle = @fopen('/etc/pihole/dns-servers.conf', 'r');
19
+ $handle = fopen('/etc/pihole/dns-servers.conf', 'r');
20
if ($handle) {
21
while (($line = fgets($handle)) !== false) {
22
$line = rtrim($line);
23