- unify warning between win and unix and enable test
authorPierre Joye <pajoye@php.net>
Sun, 4 Sep 2011 21:48:22 +0000 (21:48 +0000)
committerPierre Joye <pajoye@php.net>
Sun, 4 Sep 2011 21:48:22 +0000 (21:48 +0000)
ext/standard/dns_win32.c
ext/standard/tests/network/bug41347.phpt

index a6e5b0a4838ace4b35a9afb8c99e192d5aa6220a..e20b19d0ac28446243ee2a61505755c4d9332632 100644 (file)
@@ -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;
index 21fc002fa53eb9de49b22fcca1616804128b12c3..6ece098191de51fc0567b3a4eb65569eeb698c21 100644 (file)
@@ -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(''));