diff options
author | Ondřej Surý <ondrej@sury.org> | 2015-01-26 11:52:53 +0100 |
---|---|---|
committer | Ondřej Surý <ondrej@sury.org> | 2015-01-26 11:52:53 +0100 |
commit | 832b62efb8fceebb220116d8024d945a9bd31d7e (patch) | |
tree | e3c65d02b50180c7d7d7c21626d403d2eb87793a /ext/standard/dns.c | |
parent | 60fede4c90746ef3408ed27a15dd405b3a46a83b (diff) | |
download | php-upstream/5.6.5+dfsg.tar.gz |
New upstream version 5.6.5+dfsgupstream/5.6.5+dfsg
Diffstat (limited to 'ext/standard/dns.c')
-rw-r--r-- | ext/standard/dns.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/ext/standard/dns.c b/ext/standard/dns.c index 0b5e69ca5..a67397470 100644 --- a/ext/standard/dns.c +++ b/ext/standard/dns.c @@ -897,7 +897,24 @@ PHP_FUNCTION(dns_get_record) if (n < 0) { php_dns_free_handle(handle); - continue; + switch (h_errno) { + case NO_DATA: + case HOST_NOT_FOUND: + continue; + + case NO_RECOVERY: + php_error_docref(NULL TSRMLS_CC, E_WARNING, "An unexpected server failure occurred."); + break; + + case TRY_AGAIN: + php_error_docref(NULL TSRMLS_CC, E_WARNING, "A temporary server error occurred."); + break; + + default: + php_error_docref(NULL TSRMLS_CC, E_WARNING, "DNS Query failed"); + } + zval_dtor(return_value); + RETURN_FALSE; } cp = answer.qb2 + HFIXEDSZ; |