From d037785165854872fc9b3b49ed3290ae25f939e6 Mon Sep 17 00:00:00 2001 From: Tjerk Meesters Date: Sun, 13 Jul 2014 18:23:25 +0800 Subject: [PATCH] Fix #53092 - dns_get_record does not return false on dns server failure --- ext/standard/dns.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ext/standard/dns.c b/ext/standard/dns.c index 0b5e69ca58c..79e5f1a3ff4 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;