diff --git a/ext/standard/dns.c b/ext/standard/dns.c index 13a1ab75df1..52b1b1ed8e6 100644 --- a/ext/standard/dns.c +++ b/ext/standard/dns.c @@ -896,7 +896,13 @@ PHP_FUNCTION(dns_get_record) if (n < 0) { php_dns_free_handle(handle); - continue; + if (h_errno == NO_DATA) { + continue; + } else { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Dns Query failed"); + zval_dtor(return_value); + RETURN_FALSE; + } } cp = answer.qb2 + HFIXEDSZ;