From: Tjerk Meesters Date: Sun, 13 Jul 2014 10:23:25 +0000 (+0800) Subject: Fix #53092 - dns_get_record does not return false on dns server failure X-Git-Tag: PRE_NATIVE_TLS_MERGE~93^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d037785165854872fc9b3b49ed3290ae25f939e6;p=php Fix #53092 - dns_get_record does not return false on dns server failure --- diff --git a/ext/standard/dns.c b/ext/standard/dns.c index 0b5e69ca58..79e5f1a3ff 100644 --- a/ext/standard/dns.c +++ b/ext/standard/dns.c @@ -897,7 +897,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;