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 2a73d56ef9
commit d037785165

View File

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