Skip to content

Commit 9915265

Browse files
committed
DNS reviews second round
1 parent 06d874f commit 9915265

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

ext/standard/dns.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,6 @@ PHP_FUNCTION(gethostbyaddr)
153153
hostname = php_gethostbyaddr(addr);
154154

155155
if (hostname == NULL) {
156-
// TODO Convert to ValueError?
157156
#if HAVE_IPV6 && HAVE_INET_PTON
158157
php_error_docref(NULL, E_WARNING, "Address is not a valid IPv4 or IPv6 address");
159158
#else
@@ -394,8 +393,7 @@ PHP_FUNCTION(dns_check_record)
394393
else if (!strcasecmp("NAPTR", rectype)) type = DNS_T_NAPTR;
395394
else if (!strcasecmp("A6", rectype)) type = DNS_T_A6;
396395
else {
397-
zend_argument_value_error(2, "must be one of \"A\", \"NS\", \"MX\", \"PTR\", \"ANY\", \"SAO\", \"CAA\", "
398-
"\"TXT\", \"CNAME\", \"AAAA\", \"SRV\", \"NAPTR\", or \"A6\"");
396+
zend_argument_value_error(2, "must be a valid DNS record type");
399397
RETURN_THROWS();
400398
}
401399
}
@@ -839,8 +837,7 @@ PHP_FUNCTION(dns_get_record)
839837

840838
if (!raw) {
841839
if ((type_param & ~PHP_DNS_ALL) && (type_param != PHP_DNS_ANY)) {
842-
zend_argument_value_error(2, "must be one of DNS_A, DNS_CNAME, DNS_HINFO, DNS_CAA, DNS_MX, "
843-
"DNS_NS, DNS_PTR, DNS_SOA, DNS_TXT, DNS_AAAA, DNS_SRV, DNS_NAPTR, DNS_A6, DNS_ALL, or DNS_ANY");
840+
zend_argument_value_error(2, "must be a DNS_* constant");
844841
RETURN_THROWS();
845842
}
846843
} else {

0 commit comments

Comments
 (0)