Commit 097e944f authored by KR Moorhouse's avatar KR Moorhouse

Added sanity check to confirm we have a valid IP address before sending to dispatch.

parent 595c685c
......@@ -65,7 +65,13 @@ final class NF_Dispatcher
$ip_address = $_SERVER[ 'LOCAL_ADDR' ];
}
$host_name = gethostbyaddr( $ip_address );
// If we have a valid IP Address...
if ( filter_var( $ip_address, FILTER_VALIDATE_IP ) ) {
// Get the hostname.
$host_name = gethostbyaddr( $ip_address );
} else {
$host_name = 'unknown';
}
if ( is_multisite() ) {
$multisite_enabled = 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment