diff options
author | Pierre Joye <pajoye@php.net> | 2011-09-04 21:48:22 +0000 |
---|---|---|
committer | Pierre Joye <pajoye@php.net> | 2011-09-04 21:48:22 +0000 |
commit | 7e5d92106b6048fae001e718f2a5423544992d49 (patch) | |
tree | a9b21cffda72f91905f5d16e29826ce77f091020 /ext/standard/dns_win32.c | |
parent | d1b156f1be8234b491af766329e79aab41c8549f (diff) | |
download | php-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.c | 5 |
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; |