summaryrefslogtreecommitdiff
path: root/ext/standard/dns_win32.c
diff options
context:
space:
mode:
authorPierre Joye <pajoye@php.net>2011-09-04 21:48:22 +0000
committerPierre Joye <pajoye@php.net>2011-09-04 21:48:22 +0000
commit7e5d92106b6048fae001e718f2a5423544992d49 (patch)
treea9b21cffda72f91905f5d16e29826ce77f091020 /ext/standard/dns_win32.c
parentd1b156f1be8234b491af766329e79aab41c8549f (diff)
downloadphp-git-7e5d92106b6048fae001e718f2a5423544992d49.tar.gz
- unify warning between win and unix and enable test
Diffstat (limited to 'ext/standard/dns_win32.c')
-rw-r--r--ext/standard/dns_win32.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/standard/dns_win32.c b/ext/standard/dns_win32.c
index 7bded1cdaf..2dbf3e2e1d 100644
--- a/ext/standard/dns_win32.c
+++ b/ext/standard/dns_win32.c
@@ -103,6 +103,11 @@ PHP_FUNCTION(dns_check_record)
return;
}
+ if (hostname_len == 0) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Host cannot be empty");
+ RETURN_FALSE;
+ }
+
if (rectype) {
if (!strcasecmp("A", rectype)) type = DNS_TYPE_A;
else if (!strcasecmp("NS", rectype)) type = DNS_TYPE_NS;