Skip to content

Commit 0109eb0

Browse files
datibbawsmalyshev
authored andcommitted
Changed based on comments and make its behaviour equal to the Windows version
1 parent f2b7aed commit 0109eb0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

ext/standard/dns.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -896,10 +896,10 @@ PHP_FUNCTION(dns_get_record)
896896

897897
if (n < 0) {
898898
php_dns_free_handle(handle);
899-
if (h_errno == NO_DATA) {
899+
if (h_errno == NO_DATA || h_errno == HOST_NOT_FOUND) {
900900
continue;
901901
} else {
902-
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Dns Query failed");
902+
php_error_docref(NULL TSRMLS_CC, E_WARNING, "DNS Query failed");
903903
zval_dtor(return_value);
904904
RETURN_FALSE;
905905
}

ext/standard/dns_win32.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ PHP_FUNCTION(dns_get_record)
456456
if (status == DNS_INFO_NO_RECORDS || status == DNS_ERROR_RCODE_NAME_ERROR) {
457457
continue;
458458
} else {
459-
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Dns Query failed");
459+
php_error_docref(NULL TSRMLS_CC, E_WARNING, "DNS Query failed");
460460
zval_dtor(return_value);
461461
RETURN_FALSE;
462462
}

0 commit comments

Comments
 (0)