mirror of
https://github.com/pi-hole/web.git
synced 2026-04-25 11:19:59 +01:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user