Permalink
Browse files

- unify warning between win and unix and enable test

  • Loading branch information...
1 parent d1b156f commit 7e5d92106b6048fae001e718f2a5423544992d49 @pierrejoye pierrejoye committed Sep 4, 2011
Showing with 5 additions and 6 deletions.
  1. +5 −0 ext/standard/dns_win32.c
  2. +0 −6 ext/standard/tests/network/bug41347.phpt
View
@@ -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;
@@ -1,11 +1,5 @@
--TEST--
dns_check_record() segfault with empty host
---SKIPIF--
-<?php
-if (substr(PHP_OS, 0, 3) == 'WIN') {
- die('skip No windows support');
-}
-?>
--FILE--
<?php
var_dump(dns_check_record(''));

0 comments on commit 7e5d921

Please sign in to comment.