diff --git a/scripts/pi-hole/php/FTL.php b/scripts/pi-hole/php/FTL.php index 397be1cb..958ac7be 100644 --- a/scripts/pi-hole/php/FTL.php +++ b/scripts/pi-hole/php/FTL.php @@ -36,9 +36,13 @@ function connectFTL($address, $port=4711) { $config = piholeFTLConfig(); // Read port - $portfile = file_get_contents($config["PORTFILE"]); - if(is_numeric($portfile)) - $port = intval($portfile); + $portfileName = isset($config['PORTFILE']) ? $config['PORTFILE'] : ''; + if ($portfileName != '') + { + $portfileContents = file_get_contents($portfileName); + if(is_numeric($portfileContents)) + $port = intval($portfileContents); + } } // Open Internet socket connection @@ -46,6 +50,7 @@ function connectFTL($address, $port=4711) return $socket; } + function sendRequestFTL($requestin) { global $socket; diff --git a/scripts/pi-hole/php/theme.php b/scripts/pi-hole/php/theme.php index 274fb31c..429aa7cb 100644 --- a/scripts/pi-hole/php/theme.php +++ b/scripts/pi-hole/php/theme.php @@ -42,7 +42,6 @@ $theme = $available_themes[$webtheme][2]; $checkbox_theme_name = $available_themes[$webtheme][3]; $checkbox_theme_variant = $available_themes[$webtheme][4]; -error_log(print_r($available_themes,true)); function theme_selection() { global $available_themes, $webtheme; foreach ($available_themes as $key => $value) {