Fix #53092 - dns_get_record does not return false on dns server failure

This commit is contained in:
Tjerk Meesters 2014-07-13 18:23:25 +08:00 committed by Stanislav Malyshev
parent 2534671f0b
commit f2b7aeda2b

View File

@ -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;