From: David Carlier Date: Wed, 22 May 2019 22:04:56 +0000 (+0200) Subject: list net/interfaces, trying to get the error on windows when possible X-Git-Tag: php-7.4.0alpha1~199 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d9747c23a2e16825e141c5b2573afb805d42f97f;p=php list net/interfaces, trying to get the error on windows when possible --- diff --git a/ext/standard/net.c b/ext/standard/net.c index 6bec7f06b5..600ef8d0e0 100644 --- a/ext/standard/net.c +++ b/ext/standard/net.c @@ -177,7 +177,9 @@ PHP_FUNCTION(net_get_interfaces) { dwRetVal = GetAdaptersAddresses(family, flags, NULL, pAddresses, &outBufLen); if (NO_ERROR != dwRetVal) { - /* TODO check GetLastError() */ + char *buf = php_win32_error_to_msg(GetLastError()); + zend_error(E_WARNING, "GetAdaptersAddresses failed: %s", buf); + php_win32_error_msg_free(buf); FREE(pAddresses); RETURN_FALSE; }