UPnP: Make error message less useless

This commit is contained in:
Dylan K. Taylor 2018-07-26 16:00:35 +01:00
parent ab0510cb37
commit b3f2396ea5

View File

@ -47,8 +47,9 @@ abstract class UPnP{
/** @noinspection PhpUndefinedClassInspection */
$com = new \COM("HNetCfg.NATUPnP");
/** @noinspection PhpUndefinedFieldInspection */
if($com === false or !is_object($com->StaticPortMappingCollection)){
throw new \RuntimeException("Failed to portforward (unsupported?)");
throw new \RuntimeException("Failed to portforward using UPnP. Ensure that network discovery is enabled in Control Panel.");
}
/** @noinspection PhpUndefinedFieldInspection */