While I'm in here.. prevent another error being constantly output to the error log

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
This commit is contained in:
Adam Warner
2020-05-18 18:09:23 +01:00
parent 2633cbace6
commit e3cd70dcb3

View File

@@ -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;